Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add [lang]-query-file arg #168

Merged
merged 4 commits into from
Nov 9, 2024
Merged

Conversation

bheylin
Copy link
Contributor

@bheylin bheylin commented Nov 5, 2024

Polish off #144

Copy link
Owner

@alexpovel alexpovel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

README.md Show resolved Hide resolved
@alexpovel
Copy link
Owner

CI failing at https://github.com/alexpovel/srgn/actions/runs/11693746764/job/32611046155?pr=168#step:7:321 because some GitHub Actions runners we get are on Rust 1.82, some on 1.81. Flaky! But irrelevant. Will maybe fix on main.

@alexpovel
Copy link
Owner

If you rebase onto main, there's some goodies waiting:

  • 2ce5a19 lets you run ./scripts/update-readme.py and it'll update the srgn --help section automatically (not tested extensively yet)

  • bdd183c will let you add as many tag() as you want. Your new arguments are the longest of all existing ones, so put them first:

    srgn/tests/readme.rs

    Lines 495 to 503 in bdd183c

    // ⚠️ Careful: all `--<lang>-query` options need to come
    // first; otherwise, the shorter `--<lang>` options eat
    // them and results turn bad (complaining that `-query`
    // is not a valid value). Generally, parsing is greedy,
    // so shorter values will short-circuit, potentially
    // incorrectly. That's why lines are generally sorted
    // longest to shortest, to avoid confusion.
    //
    // Parsing is brittle here :-(

    Put them in their own arg group like the others and it should fit and work.

  • 3af3f52 removed the bug required the hack with a trailing space

  • 0e100dd silences the lint which is failing CI

@bheylin
Copy link
Contributor Author

bheylin commented Nov 7, 2024

If you rebase onto main, there's some goodies waiting:

* [2ce5a19](https://github.com/alexpovel/srgn/commit/2ce5a1920ffe82b58ebb6b1caeb0dd8b145ab979) lets you run `./scripts/update-readme.py` and it'll update the `srgn --help` section automatically (not tested extensively yet)

Ah good quality of life improvement!

* [bdd183c](https://github.com/alexpovel/srgn/commit/bdd183cc27036f7840db2c0d85a89a7d04c0dd0e) will let you add as many `tag()` as you want. Your new arguments are the longest of all existing ones, so put them first:
  https://github.com/alexpovel/srgn/blob/bdd183cc27036f7840db2c0d85a89a7d04c0dd0e/tests/readme.rs#L495-L503
  
  Put them in their own `arg` group like the others and it should fit and work.

Done! a77b149.

* [3af3f52](https://github.com/alexpovel/srgn/commit/3af3f52c428a526e15239b1759f8500080fbba0a) removed the bug required the hack with a trailing space

Good to get that confusing issue fixed.

* [0e100dd](https://github.com/alexpovel/srgn/commit/0e100dd0fc4798672ffe880d5654ca23387aefbb) silences the lint which is failing CI

🥳

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 94.44444% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.48%. Comparing base (4a513ec) to head (a77b149).

Files with missing lines Patch % Lines
src/main.rs 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #168      +/-   ##
==========================================
+ Coverage   88.34%   88.48%   +0.14%     
==========================================
  Files          33       33              
  Lines        1930     1920      -10     
==========================================
- Hits         1705     1699       -6     
+ Misses        225      221       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alexpovel alexpovel merged commit 4967356 into alexpovel:main Nov 9, 2024
15 checks passed
@alexpovel
Copy link
Owner

Great, merged! Thanks for your work, I'll release soon and then you can finally use it.

@bheylin
Copy link
Contributor Author

bheylin commented Nov 9, 2024

Great, merged! Thanks for your work, I'll release soon and then you can finally use it.

Nice! I'll be trying it out as part of the CI process of a 200K LOC Rust project to perform custom linting.
I'll be back with feedback and more PR's!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants