[Bug] Elixir `.formatter.exs`, `.credo.exs`, `config/*.exs` and `priv/**/*.exs` are reported as unreachable files
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
Research direction
Start in packages/core/src/repowise/core/analysis/dead_code/constants.py at the _NEVER_FLAG_PATTERNS tuple, next to the existing seed and migrations entries and the alembic versions pattern. Add root and nested forms for .formatter.exs, .credo.exs, config/.exs and priv/.exs. Done when tests/unit/dead_code/test_convention_never_flag.py covers each pattern at the root and under apps/x/, a negative lib/x.ex case passes, and test_never_flag_regex.py stays green.
Written by the indexing model from the issue text.
Description
Summary
Mix and its tools read these files by path, so nothing imports them, and the never-flag list has no Elixir entries. Each is reported as an unreachable_file.
packages/core/src/repowise/core/analysis/dead_code/constants.py:43
_NEVER_FLAG_PATTERNS: tuple[str, ...] = (
Mechanism
- The list exempts run-by-name files such as
*.sh,*.triggerand*conftest.py; no.exspath is in it. .formatter.exsand.credo.exsare read by the formatter and linter,config/*.exsby Mix at boot, and data files underpriv/byCode.eval_fileorFile.read!.priv/repo/seeds.exsandpriv/repo/migrations/*.exsare already covered by*seed*(:66) and*migrations*(:64).- Precedent:
*/alembic/versions/*.py(:60), added for reflectively loaded files. A*/x/*pattern does not match a root-levelx/path, so root and nested forms both need an entry.
Repro
mix.exs, lib/demo.ex, lib/demo/langs.ex (Code.eval_file(... "data/langs.exs"))
.formatter.exs, .credo.exs, config/config.exs, config/runtime.exs
priv/data/langs.exs, priv/repo/seeds.exs
repowise init --mode fast --no-prose, then repowise dead-code on main:
| unreachable_file | .credo.exs | 40% | ✗ | 1 | File has no importers (in_degree=0) |
| unreachable_file | .formatter.exs | 40% | ✗ | 1 | File has no importers (in_degree=0) |
| unreachable_file | config/config.exs | 40% | ✗ | 2 | File has no importers (in_degree=0) |
| unreachable_file | config/runtime.exs | 40% | ✗ | 2 | File has no importers (in_degree=0) |
| unreachable_file | priv/data/langs.exs | 40% | ✗ | 1 | File has no importers (in_degree=0) |
Impact
Config and formatter files show up as deletion candidates on every Elixir repo.
Done looks like
- Add
.formatter.exs,.credo.exs,config/*.exs,priv/*.exsand their nested forms (umbrellaapps/*/config/,apps/*/priv/) to_NEVER_FLAG_PATTERNS. lib/**/*.exand.exsfiles outside those paths stay reportable.- Path rules only; no change to
repowise.core.code_origin. - Good first issue: one constant and a clear test.
Tests
tests/unit/dead_code/test_convention_never_flag.py: one case per pattern at the root and under apps/x/, plus a negative lib/x.ex. test_never_flag_regex.py must stay green.
- Dominant language
- Python
- Stars
- 7.1k
- Forks
- 756
- Avg merge
- 21h 5m
- Merged PRs (30d)
- 797
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from repowise-dev/repowise
-
[Bug] Coverage stack detection omits Swift, Dart, and Scala, falling through to UNKNOWN in evidence setupPossibly taken @RishabhIIITD claimed this 2 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
repowise-dev/repowise#5838 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] PR-mined decisions store the decision sentence again as their rationalePossibly taken @suyashgitt claimed this 11 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#5702 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] CICS CSD `DEFINE _PGMLIST` startup programs (`_PGMPH`) are not rootsPossibly taken @dchaudhari7177 claimed this 34 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#4477 ·
Maintainers usually reply within 1 day
-
[Bug] COBOL listing directives EJECT, SKIP1/SKIP2/SKIP3 and TITLE fail to parse and drop the rest of the filePossibly taken @dchaudhari7177 claimed this 34 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
repowise-dev/repowise#4474 ·
Maintainers usually reply within 1 day
-
`repowise uninstall` prints a configured database URL with a backslash on WindowsMay be free again A pull request for this issue was closed without being merged. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
repowise-dev/repowise#4347 · 2 comments ·
Maintainers usually reply within 1 day
All issues in repowise-dev/repowise
Similar issues
-
ui
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ARTPARK-SAHAI-ORG/calibrate-frontend#919 ·
Maintainers usually reply within 1 day
-
CI: MSYS2 jobs fail — mingw python3 package renamed upstream to pythonPossibly taken @ronaldtse claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
pydantic/pytest-examples#102 · 1 comment ·