Repository navigation
feat(rules): Elixir (Mix) _build and deps - #12
Merged
Merged
Conversation
A Mix project (mix.exs) builds into _build and fetches dependencies into
deps; those are Mix's defaults ("defaults to _build", "Defaults to deps",
https://hexdocs.pm/mix/Mix.Project.html). _build is Safe: the next
compile recreates it. deps is Caution: it needs `mix deps.get` (a
download) first, so it is never ticked for the user. An umbrella's apps
share the umbrella's folders, so only the top project offers them, and
the walk never enters deps, so the dependencies' own mix.exs files are
not reported as projects.
Adds elixir.toml to BUNDLED, match and nomatch fixtures, the README
table row, and a line in RULE-SCHEMA.md that new files go in BUNDLED
(bundled_rules_match_the_rules_folder fails otherwise).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Finjineersdev
force-pushed
the
feat-rules-elixir-mix
branch
from
November 27, 2026 22:50
736a4fb to
c056176
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a rule for Elixir projects built with Mix (
mix.exsin the folder):_buildmix compiledepsmix deps.getBoth are Mix's own default folders. From https://hexdocs.pm/mix/Mix.Project.html:
:deps_path"Defaults to"deps"", and the build path "is built based on the:build_pathconfiguration (which defaults to"_build")".Why it is safe
_buildis compiled output; the nextmix compilerecreates it with no user action.depsneeds a download (mix deps.get), so it is Caution: never ticked for the user, andcleanneeds--include-caution.depsfolder with files git tracks (vendored dependencies) is refused._buildanddeps(../../_build), so only the top project offers them. The walk does not enterdeps, so each dependency's ownmix.exsis not reported as a project. Checked by hand on a throwaway umbrella layout:scanfound the umbrella (_buildSafe,depsCaution) andapps/webwith nothing to clean, and no projects insidedeps.Changes
engine/rules/elixir.toml(new) and its entry inBUNDLEDinopensweep-core/src/rules.rs.elixir/match/appandelixir/nomatch/no-mix-file.docs/RULE-SCHEMA.md, "Contributing a rule": a new rule file must also go inBUNDLED. I missed that at first and onlybundled_rules_match_the_rules_foldercaught it.tests/snapshots/rules-check.json: 12 rule files, 33 artifacts.How tested
rule_fixtures_produce_the_expected_candidatesfails withoutelixir.toml(fixture folder with no rule) and passes with it.opensweep planwith the built-in catalogue (no--rules) on a throwaway Mix project:allow _build [elixir] Safe.cargo fmt --all --check: okcargo clippy --all-targets --locked -- -D warnings: okcargo test --locked: 145 passed, 0 failedcargo run -q -p opensweep-cli -- rules-check rules: 12 rule files, 33 artifacts: okcd CleanCore && swift test: 21 tests, 0 failures;scripts/check-swift-never-deletes.sh: okRULE-SCHEMA asks for two reviewers on rule changes.
🤖 Generated with Claude Code