Commit graph

277 commits

Author SHA1 Message Date
Ed Page
b92a8c1eea feat(cli): '--file-types' flag to help debug detection issues
Like #567
2023-01-13 20:59:53 -06:00
Ed Page
4b6e9c3c1b style(cli): Resolve clap deprecations 2023-01-13 20:43:18 -06:00
Ed Page
62f10571f3 style(cli): Adjust macro/comment style 2023-01-13 20:41:35 -06:00
Ed Page
9b2ca187db fix(cli): Report correct column for brief output 2022-11-29 22:25:28 -06:00
Ed Page
2a6c8e9a3a fix(cli): Don't crash on brief output 2022-11-29 22:25:15 -06:00
Ed Page
f71f83b439 fix(cli): Don't crash on --locale 2022-11-03 22:08:04 -05:00
Ed Page
3598acea5d chore: Upgrade proc-exit 2022-10-04 10:46:45 -05:00
Ed Page
5998342bb2 refactor: Upgrade to clap v4 2022-09-28 15:53:45 -05:00
Ed Page
e5e98c3754 fix(config): Don't correct NDArray in Python
Fixes #565
2022-09-08 11:29:36 -05:00
Ed Page
b46558d506 Revert "fix(config): Don't correct thead for HTML"
This reverts commit 58012099b1.
2022-09-01 10:28:53 -05:00
Ed Page
486002cedd Revert "fix(config): Don't correct thead in css as well"
This reverts commit 599f3d4544.
2022-09-01 10:28:53 -05:00
Ed Page
449a20112f Revert "fix(config): Ignore thead for jsx/tsx"
This reverts commit dc49c98c3c.
2022-09-01 10:28:53 -05:00
Ed Page
ca422e13ce Revert "fix(config): Ignore thead for md"
This reverts commit bb04b7270a.
2022-09-01 10:28:53 -05:00
Jonas Platte
bb04b7270a
fix(config): Ignore thead for md 2022-09-01 09:18:16 +02:00
Ed Page
dc49c98c3c fix(config): Ignore thead for jsx/tsx
Fixes #545
2022-08-29 16:00:08 -05:00
Ed Page
599f3d4544 fix(config): Don't correct thead in css as well 2022-08-25 06:26:54 -05:00
Ed Page
f072e45c9c fix(config): Narrow scope of flate check 2022-08-23 08:32:27 -05:00
Ed Page
7d6047e743 fix(config): Don't correct windo in vim
Fixes #539
2022-08-23 08:25:16 -05:00
Ed Page
58012099b1 fix(config): Don't correct thead for HTML 2022-08-23 08:23:49 -05:00
Ed Page
f0ba78db1a fix(cli): Skip files that stdout is writing to
Fixes #502
2022-06-16 13:56:48 -05:00
Ed Page
0bb32cc473 fix(config): Resolve ambiguous file types
Before, when two file types matched the same glob, the file type that
one was non-deterministic.

Now, "the more specific" file type wins.  What this means is that we
break up the file by its extensions and prioritize the more literal glob
- If its just `*`, then its lowest priority
- If it contains `*` and other logic, then its next
- If it doesn't contain a `*`, then its the highest priority

This leaves out other glob syntax like `{one,two}` as those are
closed-ended and so considered specific still.

Fixes #487
2022-06-15 15:53:04 -05:00
Ed Page
5ae7bda8eb style: Silence clippy 2022-05-16 09:09:17 -05:00
Ed Page
a17f6a284a feat(cli): Log the policy
This is in part to help in cases like #487 but it will also help people
generally configure and debug their config.
2022-05-16 09:06:28 -05:00
SeongChan Lee
a759af71d4 fix: Fix the width of numbers and some symbols 2022-04-28 23:25:20 +09:00
SeongChan Lee
c191a78a77 fix: Fix highlight indenting for emojis and tab characters 2022-04-28 11:44:25 +09:00
SeongChan Lee
f2de431701 fix: Change column number to 1-based index 2022-04-28 11:44:24 +09:00
SeongChan Lee
e096eb2095 fix: Fix misalignment in report highlight and indent
Previous method misaligns highlights when there are double width asian characters
```
39 |  한글 eglish
   |    ^^^^^^
```
This commit fixes the highlight to have correct alignment.
```
39 |  한글 eglish
   |      ^^^^^^
```
`unicode-rs` crate is used by the Rust compiler [1].
[1]: 34a6c9f26e/compiler/rustc_errors/src/emitter.rs (L861)
2022-04-26 17:30:12 +09:00
Ed Page
bead488a6c fix(config): Set file types for go.mod/go.sum
`go.mod` seems to be a specification file which we tend to lump in with
the language itself since a weirdly spell dependency will likely show up
in code.

`go.sum` seems to be like a lock file which we quarantine into its own
file type.

Fixes #458
2022-04-06 12:19:49 -05:00
Ed Page
e3a1397e04 chore: Remove duplicate lock entry 2022-04-06 12:18:40 -05:00
Ed Page
86c54fffbf style: Update clippy 2022-03-29 15:07:19 -05:00
Ed Page
e70667ebae fix: Ignore lock files by default
First, this centralizes the concept of lock files, focusing on intent,
rather than syntax.  We are assuming `requirements.txt` for Python is
being used like a regular lock file and not as a dependency
specification.

Second, we then ignore the content.  Though a lock file will generally
contain things that could show up in a dependency specification, the
large dependency trees make that harder to manage.  We still have the
dependency specification file which will match with the users code.

Fixes #445
2022-03-09 08:45:55 -06:00
Ed Page
560de68f58 refactor: Move default config to default types 2022-03-09 08:37:22 -06:00
Ed Page
8cb2d44284 refactor: Pull out custom default types
This is
https://github.com/BurntSushi/ripgrep/blob/master/crates/ignore/src/default_types.rs
at 418d048.
2022-03-09 08:28:23 -06:00
Ed Page
cf20628f28 refactor: Resolve deprecations 2022-03-01 08:38:31 -06:00
Ed Page
4971ea89c9 style: Make clippy happy 2022-01-24 12:14:15 -06:00
Ed Page
9b6b0dee5c test: Ensure extend-words also works
This was fixed in the previous commit when dealing with
deny_unknown_fields.

Fixes #407
2022-01-24 12:01:00 -06:00
Ed Page
55114b3777 fix(config): Allow check-file to work
Looks like `deny_unknown_fields` doesn't work with `flatten`.  See serde-rs/serde#1547.

Fixes #406
2022-01-24 12:01:00 -06:00
Ed Page
9134bec15e refactor(config): Line per attribute 2022-01-24 12:01:00 -06:00
Ed Page
900619be86 docs: Fix typo in example config
Fixes #404
2022-01-24 12:00:59 -06:00
Ed Page
91281038aa fix(config): Update to TOML 1.0
Fixes #405
2022-01-24 12:00:52 -06:00
Ed Page
3d33e7e888 chore: Upgrade concolor 2022-01-11 15:55:20 -06:00
Ed Page
9c5b84d5fe feat: Upgrate to clap3 2021-12-31 15:52:39 -06:00
Ed Page
5c83dec07b style: Remove unused variable 2021-12-14 15:41:52 -06:00
Ed Page
05edccea2e style: Make clippy happy 2021-11-08 11:28:34 -06:00
Ed Page
1046b89208 fix(config): Avoid correcting Rust names
Part of #362
2021-10-23 09:24:37 -05:00
Ed Page
b7812e616c fix(config): Check project files with language
For `rg`, keeping the file types strict makes sense,  For spell
checking, `Cargo.toml` is a lot more closely related in handling to
`*.rs` than it is to `pyproject.toml` due to ecosystem package names.

Part of #362
2021-10-23 09:24:31 -05:00
Ed Page
29ebe5ab48 fix(config): Skip lock files by default
Part of #362
2021-10-23 09:24:25 -05:00
Ed Page
83dc9dcb5f fix(config): Overlay default/overrides with type-config 2021-10-23 09:24:25 -05:00
Ed Page
b17b811ec1 feat(cli): Smarter color control 2021-10-06 10:08:42 -05:00
Ed Page
27bd817498 fix(config): Skip checking cert contents
Fixes #327
2021-08-04 07:12:10 -05:00