Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ project runs again, so they are never ticked for you.
| .NET | `bin` `obj` | |
| Elixir (Mix) | `_build` | `deps` |
| PHP (Composer) | | `vendor` |
| Zig | `.zig-cache` `zig-cache` `zig-out` | |

Add your own rules in `~/Library/Application Support/OpenSweep/rules`, or keep a
`.opensweep.toml` in a repository to pin it or exclude folders
Expand Down
4 changes: 2 additions & 2 deletions engine/crates/opensweep-cli/tests/snapshots/rules-check.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[
{
"artifacts": 34,
"artifacts": 37,
"command": "rules-check",
"rule_files": 12,
"rule_files": 13,
"schema_version": 1
}
]
1 change: 1 addition & 0 deletions engine/crates/opensweep-core/src/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,7 @@ const BUNDLED: &[(&str, &str)] = &[
("rust.toml", include_str!("../../../rules/rust.toml")),
("swiftpm.toml", include_str!("../../../rules/swiftpm.toml")),
("xcode.toml", include_str!("../../../rules/xcode.toml")),
("zig.toml", include_str!("../../../rules/zig.toml")),
];

/// The catalogue plus the user's own rule files in `dir` (P8), linted the
Expand Down
Empty file.
Empty file.
Empty file.
2 changes: 2 additions & 0 deletions engine/rules/fixtures/zig/match/app/expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.zig-cache
zig-out
Empty file.
Empty file.
Empty file.
1 change: 1 addition & 0 deletions engine/rules/fixtures/zig/match/old-cache/expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
zig-cache
Empty file.
Empty file.
Empty file.
Empty file.
28 changes: 28 additions & 0 deletions engine/rules/zig.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
schema = 2
id = "zig"
name = "Zig"

# https://ziglang.org/learn/build-system/: "There are two generated
# directories in this output: `.zig-cache` and `zig-out`", where zig-out is
# the "installation prefix" (`zig build --help`: "default: zig-out"). Zig
# before 0.13 named the cache `zig-cache`, without the dot.
[detect]
any_files = ["build.zig"]

[[artifact]]
path = ".zig-cache"
class = "safe"
reason = "Zig build cache. Recreated by the next zig build."
restore = "zig build"

[[artifact]]
path = "zig-cache"
class = "safe"
reason = "Zig build cache (Zig 0.12 and older). Recreated by the next zig build."
restore = "zig build"

[[artifact]]
path = "zig-out"
class = "safe"
reason = "Zig install output. Recreated by the next zig build."
restore = "zig build"
Loading