Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
b31922c
feat(tree-sitter-compact): add declaration-level Compact grammar
0xisk Sep 15, 2026
0d4991b
refactor(compact-tree-sitter): rename the grammar crate
0xisk Sep 15, 2026
ec5cb8a
feat(compact-lint): add the check command
0xisk Sep 15, 2026
a8ac656
feat(compact-lint): add the fix command
0xisk Sep 15, 2026
25b4943
feat(compact-lint): add the fill-constraints command
0xisk Sep 15, 2026
2ad67ef
test(compact-lint): track the seeded cache fixture
0xisk Sep 15, 2026
80691d5
build(compact-lint): ship prebuilt binaries through npm
0xisk Sep 15, 2026
b3c6c8c
build(compact-linter): name the npm package compact-linter
0xisk Sep 15, 2026
71db1e8
build(compact-linter): finish the compact-linter rename
0xisk Sep 15, 2026
2b05856
feat(compact-lint): render biome-style diagnostics
0xisk Sep 15, 2026
3f722cb
refactor(compact-lint): read the [lint] table of compact.toml
0xisk Sep 15, 2026
0ce9b33
feat(compact-lint): lint doc sections against a template
0xisk Sep 15, 2026
fbf050a
feat(compact-lint): add --timings phase breakdown
0xisk Sep 15, 2026
c69476d
feat(compact-lint): read measurements from the artifact dir
0xisk Sep 16, 2026
46ef29a
ci(rust): stop persisting checkout credentials
0xisk Sep 16, 2026
f06882b
docs(compact-tree-sitter): correct the name field claim
0xisk Sep 16, 2026
e2b329d
test(compact-tree-sitter): skip symlinks in the corpus walk
0xisk Sep 16, 2026
847e376
Merge branch 'feat/tree-sitter-compact' into feat/compact-lint-check
0xisk Sep 16, 2026
334b4a9
fix(compact-lint): resolve explicit paths against cwd
0xisk Sep 16, 2026
9344813
refactor(compact-lint): mark Tag::new must_use
0xisk Sep 16, 2026
3ade154
fix(compact-lint): check constraints under docs = none
0xisk Sep 16, 2026
57a8323
Merge branch 'feat/compact-lint-check' into feat/compact-lint-fix
0xisk Sep 16, 2026
0acfa84
fix(compact-lint): skip inserting a tag a rename supplies
0xisk Sep 16, 2026
e64fef9
fix(compact-lint): validate the fix placeholder
0xisk Sep 16, 2026
c4737e6
fix(compact-lint): validate rename against forbid
0xisk Sep 16, 2026
aa06bbd
fix(compact-lint): write through a unique temp file
0xisk Sep 16, 2026
4802e70
Merge branch 'feat/compact-lint-fix' into feat/compact-lint-fill-cons…
0xisk Sep 16, 2026
f5b467e
docs(compact-lint): tag output fences as text
0xisk Sep 16, 2026
c42ba9b
fix(compact-lint): keep leading parent components
0xisk Sep 16, 2026
cc81edd
Merge branch 'feat/compact-lint-fill-constraints' into build/compact-…
0xisk Sep 16, 2026
7434b51
Merge branch 'build/compact-lint-release' into feat/compact-lint-sect…
0xisk Sep 16, 2026
676a2cb
docs(compact-lint): tag output fences as text
0xisk Sep 16, 2026
be4634e
fix(compact-lint): keep section entries out of the rename skip
0xisk Sep 16, 2026
7b74838
feat(compact-lint): add the check command
0xisk Sep 15, 2026
68baa98
fix(compact-lint): resolve explicit paths against cwd
0xisk Sep 16, 2026
5ec1584
refactor(compact-lint): mark Tag::new must_use
0xisk Sep 16, 2026
3423bd6
fix(compact-lint): check constraints under docs = none
0xisk Sep 16, 2026
104d9e3
Merge branch 'feat/compact-lint-check' into feat/compact-lint-fix
0xisk Oct 13, 2026
a3e35f6
Merge branch 'main' into feat/compact-lint-fix
0xisk Nov 17, 2026
a907f86
fix(compact-lint): keep the closing */ on a module-name fix
0xisk Nov 17, 2026
8a940ed
fix(compact-lint): move delimiter-line text before inserting
0xisk Nov 17, 2026
8b14e94
fix(compact-lint): write the constraints tag only once
0xisk Nov 17, 2026
fe190a2
Merge branch 'feat/compact-lint-fix' into feat/compact-lint-fill-cons…
0xisk Nov 17, 2026
fd8b639
Merge branch 'main' into feat/compact-lint-fill-constraints
0xisk Nov 17, 2026
87569ed
fix(compact-lint): keep a note when k/rows match
0xisk Nov 17, 2026
948fc68
docs(compact-lint): drop the shared-cache claim
0xisk Nov 17, 2026
d478903
fix(compact-lint): keep edits saved during a fill
0xisk Nov 17, 2026
8a3f1d3
fix(compact-lint): measure under NO_COLOR
0xisk Nov 17, 2026
fe318a2
refactor(compact-lint): share one path normalize
0xisk Nov 17, 2026
f9d2556
fix(compact-lint): measure up to 500 circuits per compile
0xisk Nov 17, 2026
eddda31
Merge branch 'feat/compact-lint-fill-constraints' into build/compact-…
0xisk Nov 17, 2026
fdcda37
Merge branch 'main' into build/compact-lint-release
0xisk Nov 17, 2026
070f457
fix(compact-linter): cache the binary per user
0xisk Nov 17, 2026
d034e0f
fix(compact-linter): never replace published release assets
0xisk Nov 17, 2026
551d97f
fix(compact-linter): reject musl hosts
0xisk Nov 17, 2026
6b0bfd5
ci(compact-linter): keep the binary build token-free
0xisk Nov 17, 2026
d3fdb79
docs: describe the release dependency graph
0xisk Nov 17, 2026
6c2aedb
ci(compact-linter): check the commit after checkout
0xisk Nov 17, 2026
551d04f
Merge branch 'build/compact-lint-release' into feat/compact-lint-diag…
0xisk Nov 17, 2026
eadff7b
Merge remote-tracking branch 'origin/main' into feat/compact-lint-dia…
0xisk Nov 17, 2026
b6ab46c
fix(compact-lint): insert a section below every paragraph
0xisk Nov 17, 2026
388fb68
fix(compact-lint): move delimiter text before a reorder
0xisk Nov 17, 2026
87f9a21
fix(compact-lint): compile a fill dry run into a temp dir
0xisk Nov 17, 2026
ce49b5e
fix(compact-lint): take the fill exit code from rule levels
0xisk Nov 17, 2026
1e707bf
docs(compact-lint): drop the kept-artifact claim
0xisk Nov 17, 2026
c7345f6
fix(compact-lint): parse every row on a line
0xisk Nov 18, 2026
336421d
fix(compact-lint): keep missing-constraints at its level
0xisk Nov 18, 2026
4822aed
fix(compact-lint): keep a description whole on insert
0xisk Nov 18, 2026
5f36653
docs(compact-linter): roll the changelog to 0.1.0
0xisk Nov 18, 2026
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
7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,8 @@ managed/
# never gets committed — including under examples/, where the walkthrough
# expects you to compile the contract yourself before deploying.
artifacts/
# compact-lint's measurement cache, written next to the .compact sources
# it measures.
.circuit-info.json
# Except the seeded cache the fill-constraints tests read.
!crates/compact-lint/tests/fixtures/**/.circuit-info.json
# Except the seeded artifacts the fill-constraints tests read.
!crates/compact-lint/tests/fixtures/**/artifacts/
midnight-level-db
compactc

Expand Down
8 changes: 8 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ codegen-units = 1
pedantic = { level = "warn", priority = -1 }

[workspace.dependencies]
anstyle = "1.0"
anyhow = "1.0"
cc = "1"
clap = { version = "4.6", features = ["derive", "env"] }
globset = "0.4"
portable-pty = "0.9"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
similar = "2.7"
thiserror = "2.0"
toml = "1.1"
tree-sitter = "0.25"
Expand Down
2 changes: 2 additions & 0 deletions crates/compact-lint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ name = "compact-lint"
path = "src/main.rs"

[dependencies]
anstyle.workspace = true
anyhow.workspace = true
clap.workspace = true
globset.workspace = true
portable-pty.workspace = true
serde.workspace = true
serde_json.workspace = true
similar.workspace = true
tempfile.workspace = true
thiserror.workspace = true
toml.workspace = true
Expand Down
319 changes: 243 additions & 76 deletions crates/compact-lint/README.md

Large diffs are not rendered by default.

44 changes: 0 additions & 44 deletions crates/compact-lint/examples/compact-contracts.toml

This file was deleted.

97 changes: 97 additions & 0 deletions crates/compact-lint/examples/compact.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# compact-lint config for OpenZeppelin/compact-contracts.
# Copy it to the repository root as compact.toml.
#
# One project, one config file. compact-deploy's `[profile]`, `[networks.*]`,
# `[wallet]` and `[contracts.*]` tables live in this same file and the linter
# ignores them; see examples/fungible-token/compact.toml for their shape.

[lint]
include = ["contracts/src/**/*.compact"]
exclude = ["**/test/mocks/**", "**/archive/**"]

# `@constraints` is the default; set `tag` to point the rule at another annotation.
[lint.constraints]
tag = "@constraints"
# Where the builder and fill-constraints write `<Stem>/circuit-info.json`, relative to
# this file. `--artifacts <dir>` overrides it.
artifacts = "contracts/artifacts"
# Presets are contracts, so fill-constraints compiles them directly. Everything else is
# measured through the mock beside it or in its parent, the default `sources` templates.
self = ["**/presets/**"]

[lint.tags]
forbid = ["@return"]
rename = { "@return" = "@returns" }

# Every rule's default level, spelled out. Set one to "off" to stop it running, or to
# "warn" / "info" to keep it out of the exit code. `check --strict` promotes
# constraints-placeholder to "error" for that run.
# [lint.rules]
# missing-doc = "error"
# missing-tag = "error"
# unknown-section = "warn"
# tag-order = "error"
# forbidden-tag = "error"
# module-name = "error"
# missing-constraints = "error"
# constraints-format = "error"
# constraints-placeholder = "warn"
# constraints-unmeasured = "warn"
# constraints-unmeasurable = "warn"
# parse = "error"
# format = "error"

# The module header template. `tags` is what every header must carry, `sections` is every
# allowed section in template order, and a required entry also appears in `sections`. Both
# lists are a starting point: moving an entry into `tags` makes it required, and a heading
# `sections` does not name is reported as unknown-section.
[lint.kinds.module]
docs = "all"
tags = [
"@module",
"@description",
"@notice Privacy",
"@notice Security",
"@notice Concurrency",
"@notice Scope",
"@dev Performance",
]
sections = [
"@module",
"@description",
"@dev Notation",
"@dev Derivations",
"@dev Parameterization",
"@dev Compatibility",
"@notice Privacy",
"@notice Security",
"@notice Concurrency",
"@notice Scope",
"@notice Client-side duties",
"@notice Scalability",
"@dev Performance",
"@dev Composition",
]

[lint.kinds.circuit]
tags = ["@description"]

[lint.kinds.ledger]
tags = ["@description"]

[lint.kinds.witness]
docs = "all"
tags = ["@description"]

[lint.kinds.struct]
tags = ["@description"]

[lint.kinds.enum]
tags = ["@description"]

[lint.kinds.constructor]
docs = "none"

[lint.kinds.contract]

[lint.kinds.type]
Loading
Loading