-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0525c4a
commit 0704bf2
Showing
17 changed files
with
260 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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
File renamed without changes.
File renamed without changes.
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
This file contains 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
This file contains 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
38 changes: 38 additions & 0 deletions
38
...o/snapshots/ruff__rules__flake8_todo__tests__invalid-capitalization-in-todo_TD006.py.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
source: crates/ruff/src/rules/flake8_todo/mod.rs | ||
--- | ||
TD006.py:4:3: TD006 [*] Invalid TODO capitalization: `ToDo` should be `TODO` | ||
| | ||
4 | # TODO (evanrittenhouse): this is a valid TODO | ||
5 | # TDO006 - error | ||
6 | # ToDo (evanrittenhouse): invalid capitalization | ||
| ^^^^ TD006 | ||
7 | # todo (evanrittenhouse): another invalid capitalization | ||
| | ||
= help: Replace `ToDo` with `TODO` | ||
|
||
ℹ Suggested fix | ||
1 1 | # TDO006 - accepted | ||
2 2 | # TODO (evanrittenhouse): this is a valid TODO | ||
3 3 | # TDO006 - error | ||
4 |-# ToDo (evanrittenhouse): invalid capitalization | ||
4 |+# TODO (evanrittenhouse): invalid capitalization | ||
5 5 | # todo (evanrittenhouse): another invalid capitalization | ||
|
||
TD006.py:5:3: TD006 [*] Invalid TODO capitalization: `todo` should be `TODO` | ||
| | ||
5 | # TDO006 - error | ||
6 | # ToDo (evanrittenhouse): invalid capitalization | ||
7 | # todo (evanrittenhouse): another invalid capitalization | ||
| ^^^^ TD006 | ||
| | ||
= help: Replace `todo` with `TODO` | ||
|
||
ℹ Suggested fix | ||
2 2 | # TODO (evanrittenhouse): this is a valid TODO | ||
3 3 | # TDO006 - error | ||
4 4 | # ToDo (evanrittenhouse): invalid capitalization | ||
5 |-# todo (evanrittenhouse): another invalid capitalization | ||
5 |+# TODO (evanrittenhouse): another invalid capitalization | ||
|
||
|
20 changes: 20 additions & 0 deletions
20
...les/flake8_todo/snapshots/ruff__rules__flake8_todo__tests__invalid-todo-tag_TD001.py.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
source: crates/ruff/src/rules/flake8_todo/mod.rs | ||
--- | ||
TD001.py:7:3: TD001 Invalid TODO tag: `XXX` should be `TODO` | ||
| | ||
7 | # T001 - errors | ||
8 | # XXX (evanrittenhouse): this is not fine | ||
| ^^^ TD001 | ||
9 | # FIXME (evanrittenhouse): this is not fine | ||
| | ||
|
||
TD001.py:8:3: TD001 Invalid TODO tag: `FIXME` should be `TODO` | ||
| | ||
8 | # T001 - errors | ||
9 | # XXX (evanrittenhouse): this is not fine | ||
10 | # FIXME (evanrittenhouse): this is not fine | ||
| ^^^^^ TD001 | ||
| | ||
|
||
|
31 changes: 31 additions & 0 deletions
31
...ake8_todo/snapshots/ruff__rules__flake8_todo__tests__missing-author-in-todo_TD002.py.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
source: crates/ruff/src/rules/flake8_todo/mod.rs | ||
--- | ||
TD002.py:5:7: TD002 Missing author in TODO. Try: # TODO (<author_name>): ... | ||
| | ||
5 | # TODO(evanrittenhouse): this also has an author | ||
6 | # T002 - errors | ||
7 | # TODO: this has no author | ||
| ^ TD002 | ||
8 | # FIXME: neither does this | ||
9 | # TODO : and neither does this | ||
| | ||
|
||
TD002.py:6:8: TD002 Missing author in TODO. Try: # TODO (<author_name>): ... | ||
| | ||
6 | # T002 - errors | ||
7 | # TODO: this has no author | ||
8 | # FIXME: neither does this | ||
| ^ TD002 | ||
9 | # TODO : and neither does this | ||
| | ||
|
||
TD002.py:7:7: TD002 Missing author in TODO. Try: # TODO (<author_name>): ... | ||
| | ||
7 | # TODO: this has no author | ||
8 | # FIXME: neither does this | ||
9 | # TODO : and neither does this | ||
| ^ TD002 | ||
| | ||
|
||
|
31 changes: 31 additions & 0 deletions
31
...lake8_todo/snapshots/ruff__rules__flake8_todo__tests__missing-colon-in-todo_TD004.py.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
source: crates/ruff/src/rules/flake8_todo/mod.rs | ||
--- | ||
TD004.py:4:7: TD004 Missing colon in TODO. Try: # TODO: ... | ||
| | ||
4 | # TODO(evanrittenhouse): this has a colon | ||
5 | # T004 - errors | ||
6 | # TODO this has no colon | ||
| ^ TD004 | ||
7 | # TODO(evanrittenhouse) this has no colon | ||
8 | # FIXME add a colon | ||
| | ||
|
||
TD004.py:5:24: TD004 Missing colon in TODO. Try: # TODO: ... | ||
| | ||
5 | # T004 - errors | ||
6 | # TODO this has no colon | ||
7 | # TODO(evanrittenhouse) this has no colon | ||
| ^ TD004 | ||
8 | # FIXME add a colon | ||
| | ||
|
||
TD004.py:6:8: TD004 Missing colon in TODO. Try: # TODO: ... | ||
| | ||
6 | # TODO this has no colon | ||
7 | # TODO(evanrittenhouse) this has no colon | ||
8 | # FIXME add a colon | ||
| ^ TD004 | ||
| | ||
|
||
|
30 changes: 30 additions & 0 deletions
30
...flake8_todo/snapshots/ruff__rules__flake8_todo__tests__missing-link-in-todo_TD003.py.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
source: crates/ruff/src/rules/flake8_todo/mod.rs | ||
--- | ||
TD003.py:9:3: TD003 Missing issue link on the line following this TODO | ||
| | ||
9 | # TDO003 - errors | ||
10 | # TODO: this comment has no | ||
| ^^^^ TD003 | ||
11 | # link after it | ||
| | ||
|
||
TD003.py:12:3: TD003 Missing issue link on the line following this TODO | ||
| | ||
12 | # link after it | ||
13 | | ||
14 | # TODO: here's a TODO with no link after it | ||
| ^^^^ TD003 | ||
15 | def foo(x): | ||
16 | return x | ||
| | ||
|
||
TD003.py:16:3: TD003 Missing issue link on the line following this TODO | ||
| | ||
16 | return x | ||
17 | | ||
18 | # TODO: here's a TODO on the last line with no link | ||
| ^^^^ TD003 | ||
| | ||
|
||
|
41 changes: 41 additions & 0 deletions
41
...napshots/ruff__rules__flake8_todo__tests__missing-space-after-colon-in-todo_TD007.py.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
source: crates/ruff/src/rules/flake8_todo/mod.rs | ||
--- | ||
TD007.py:5:25: TD007 Missing space after colon in TODO | ||
| | ||
5 | # TODO: so does this | ||
6 | # T007 - errors | ||
7 | # TODO(evanrittenhouse):this has no space after a colon | ||
| ^ TD007 | ||
8 | # TODO (evanrittenhouse):this doesn't either | ||
9 | # TODO:neither does this | ||
| | ||
|
||
TD007.py:6:26: TD007 Missing space after colon in TODO | ||
| | ||
6 | # T007 - errors | ||
7 | # TODO(evanrittenhouse):this has no space after a colon | ||
8 | # TODO (evanrittenhouse):this doesn't either | ||
| ^ TD007 | ||
9 | # TODO:neither does this | ||
10 | # FIXME:and lastly neither does this | ||
| | ||
|
||
TD007.py:7:8: TD007 Missing space after colon in TODO | ||
| | ||
7 | # TODO(evanrittenhouse):this has no space after a colon | ||
8 | # TODO (evanrittenhouse):this doesn't either | ||
9 | # TODO:neither does this | ||
| ^ TD007 | ||
10 | # FIXME:and lastly neither does this | ||
| | ||
|
||
TD007.py:8:9: TD007 Missing space after colon in TODO | ||
| | ||
8 | # TODO (evanrittenhouse):this doesn't either | ||
9 | # TODO:neither does this | ||
10 | # FIXME:and lastly neither does this | ||
| ^ TD007 | ||
| | ||
|
||
|
31 changes: 31 additions & 0 deletions
31
...flake8_todo/snapshots/ruff__rules__flake8_todo__tests__missing-text-in-todo_TD005.py.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
source: crates/ruff/src/rules/flake8_todo/mod.rs | ||
--- | ||
TD005.py:4:25: TD005 Missing text after 'TODO' | ||
| | ||
4 | # TODO(evanrittenhouse): this has text, while the errors do not | ||
5 | # T005 - errors | ||
6 | # TODO(evanrittenhouse): | ||
| ^ TD005 | ||
7 | # TODO(evanrittenhouse) | ||
8 | # FIXME | ||
| | ||
|
||
TD005.py:5:24: TD005 Missing text after 'TODO' | ||
| | ||
5 | # T005 - errors | ||
6 | # TODO(evanrittenhouse): | ||
7 | # TODO(evanrittenhouse) | ||
| ^ TD005 | ||
8 | # FIXME | ||
| | ||
|
||
TD005.py:6:8: TD005 Missing text after 'TODO' | ||
| | ||
6 | # TODO(evanrittenhouse): | ||
7 | # TODO(evanrittenhouse) | ||
8 | # FIXME | ||
| ^ TD005 | ||
| | ||
|
||
|