Skip to content

Commit 4f1ba21

Browse files
authored
Merge branch 'main' into gh-538/main/dsc_repo_schema_derive
2 parents e690153 + 48c3ef2 commit 4f1ba21

File tree

8 files changed

+30
-12
lines changed

8 files changed

+30
-12
lines changed

build.helpers.psm1

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -471,18 +471,29 @@ function Install-TreeSitter {
471471
[switch]$UseCFS
472472
)
473473

474+
begin {
475+
$arguments = @(
476+
'install',
477+
'tree-sitter-cli',
478+
'--version', '0.25.10'
479+
)
480+
481+
if ($UseCFS) {
482+
$arguments += '--config'
483+
$arguments += '.cargo/config.toml'
484+
}
485+
}
486+
474487
process {
475488
if (Test-CommandAvailable -Name 'tree-sitter') {
476489
Write-Verbose "tree-sitter already installed."
477490
return
478491
}
479492

480493
Write-Verbose -Verbose "tree-sitter not found, installing..."
481-
if ($UseCFS) {
482-
cargo install tree-sitter-cli --config .cargo/config.toml
483-
} else {
484-
cargo install tree-sitter-cli
485-
}
494+
495+
cargo @arguments
496+
486497
if ($LASTEXITCODE -ne 0) {
487498
throw "Failed to install tree-sitter-cli"
488499
}
@@ -1289,7 +1300,7 @@ function Export-GrammarBinding {
12891300
} finally {
12901301
Pop-Location
12911302
}
1292-
1303+
12931304
}
12941305
}
12951306

@@ -1358,9 +1369,13 @@ function Build-RustProject {
13581369
cargo clean
13591370
}
13601371

1361-
if ($Clippy) {
1372+
if ($Clippy -and !$Project.ClippyUnclean) {
13621373
$clippyFlags = @()
1363-
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+
}
13641379

13651380
if ($null -ne $LASTEXITCODE -and $LASTEXITCODE -ne 0) {
13661381
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.

lib/dsc-lib/src/dscerror.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use std::str::Utf8Error;
66

77
use indicatif::style::TemplateError;
88
use thiserror::Error;
9-
use tracing::error;
109
use tree_sitter::LanguageError;
1110

1211
#[derive(Error, Debug)]

0 commit comments

Comments
 (0)