Skip to content

Commit f186c70

Browse files
authored
ci: Change dotnet formatter (#348)
Signed-off-by: André Silva <[email protected]>
1 parent bd49915 commit f186c70

File tree

3 files changed

+20
-22
lines changed

3 files changed

+20
-22
lines changed

.github/workflows/dotnet-format.yml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,29 @@ name: dotnet format
22

33
on:
44
push:
5-
branches: [ main ]
6-
paths:
7-
- '**.cs'
8-
- '.editorconfig'
5+
branches: [main]
96
pull_request:
10-
branches: [ main ]
11-
paths:
12-
- '**.cs'
13-
- '.editorconfig'
7+
branches: [main]
148

159
jobs:
1610
check-format:
1711
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
pull-requests: write
15+
packages: read
1816

1917
steps:
20-
- name: Check out code
21-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
18+
- name: Check out code
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2220

23-
- name: Setup .NET
24-
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
25-
with:
26-
global-json-file: global.json
21+
- name: Setup .NET
22+
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
23+
env:
24+
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
with:
26+
global-json-file: global.json
27+
source-url: https://nuget.pkg.github.com/open-feature/index.json
2728

28-
- name: Install format tool
29-
run: dotnet tool install -g dotnet-format
30-
31-
- name: dotnet format
32-
run: dotnet-format --folder --check
29+
- name: dotnet format
30+
run: dotnet format --verify-no-changes DotnetSdkContrib.sln

src/OpenFeature.Contrib.Providers.Flagd/FlagdProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public override Task InitializeAsync(EvaluationContext context, CancellationToke
116116
if (t.IsFaulted)
117117
{
118118
throw t.Exception;
119-
};
119+
}
120120
});
121121
}
122122

src/OpenFeature.Contrib.Providers.Flagd/Resolver/InProcess/CustomEvaluators/StringEvaluator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ internal object StartsWith(IProcessJsonLogic p, JToken[] args, object data)
1818
if (!isValid(p, args, data, out string operandA, out string operandB))
1919
{
2020
return false;
21-
};
21+
}
2222
return Convert.ToString(operandA).StartsWith(Convert.ToString(operandB));
2323
}
2424

@@ -27,7 +27,7 @@ internal object EndsWith(IProcessJsonLogic p, JToken[] args, object data)
2727
if (!isValid(p, args, data, out string operandA, out string operandB))
2828
{
2929
return false;
30-
};
30+
}
3131
return operandA.EndsWith(operandB);
3232
}
3333

0 commit comments

Comments
 (0)