Skip to content

Commit 48c3ef2

Browse files
authored
Merge pull request #1314 from SteveL-MSFT/build-clippy
Fix how clippy is used in build
2 parents 0e88855 + 950230f commit 48c3ef2

File tree

7 files changed

+14
-6
lines changed

7 files changed

+14
-6
lines changed

build.helpers.psm1

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ function Export-GrammarBinding {
13001300
} finally {
13011301
Pop-Location
13021302
}
1303-
1303+
13041304
}
13051305
}
13061306

@@ -1369,9 +1369,13 @@ function Build-RustProject {
13691369
cargo clean
13701370
}
13711371

1372-
if ($Clippy) {
1372+
if ($Clippy -and !$Project.ClippyUnclean) {
13731373
$clippyFlags = @()
1374-
cargo clippy @clippyFlags --% -- -Dwarnings --no-deps
1374+
if (!$Project.ClippyPedanticUnclean) {
1375+
cargo clippy @clippyFlags --% -- -Dclippy::pedantic --no-deps -Dwarnings
1376+
} else {
1377+
cargo clippy @clippyFlags --% -- -Dwarnings --no-deps
1378+
}
13751379

13761380
if ($null -ne $LASTEXITCODE -and $LASTEXITCODE -ne 0) {
13771381
throw "Last exit code is $LASTEXITCODE, clippy failed for at least one project"

grammars/tree-sitter-dscexpression/.project.data.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"Kind": "Grammar",
44
"IsRust": true,
55
"ClippyUnclean": true,
6+
"ClippyPedanticUnclean": true,
67
"SkipTest": {
78
"Windows": true
89
}

grammars/tree-sitter-dscexpression/grammar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const PREC = {
66
STRINGLITERAL: -11,
77
}
88

9-
module.exports = grammar({
9+
export default grammar({
1010
name: 'dscexpression',
1111

1212
extras: $ => ['\n', ' '],

grammars/tree-sitter-dscexpression/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "tree-sitter-dscexpression",
33
"version": "1.0.0",
44
"description": "Dscexpression grammar for tree-sitter",
5+
"type": "module",
56
"repository": "github:tree-sitter/tree-sitter-dscexpression",
67
"license": "MIT",
78
"main": "bindings/node",

grammars/tree-sitter-ssh-server-config/.project.data.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"Name": "tree-sitter-ssh-server-config",
33
"Kind": "Grammar",
44
"IsRust": true,
5-
"ClippyUnclean": true
5+
"ClippyUnclean": true,
6+
"ClippyPedanticUnclean": true
67
}

grammars/tree-sitter-ssh-server-config/grammar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const PREC = {
88
OPERATOR: 1
99
}
1010

11-
module.exports = grammar({
11+
export default grammar({
1212
name: 'ssh_server_config',
1313

1414
extras: $ => [' ', '\t', '\r'],

grammars/tree-sitter-ssh-server-config/package.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)