---
source: crates/ruff_linter/src/rules/pygrep_hooks/mod.rs
---
PGH004 Use specific rule codes when using `noqa`
 --> PGH004_0.py:1:8
  |
1 | x = 1  # noqa
  |        ^^^^^^
2 | x = 1  # NOQA:F401,W203
3 | # noqa
  |

PGH004 Use specific rule codes when using `noqa`
 --> PGH004_0.py:3:1
  |
1 | x = 1  # noqa
2 | x = 1  # NOQA:F401,W203
3 | # noqa
  | ^^^^^^
4 | # NOQA
5 | # noqa:F401
  |

PGH004 Use specific rule codes when using `noqa`
 --> PGH004_0.py:4:1
  |
2 | x = 1  # NOQA:F401,W203
3 | # noqa
4 | # NOQA
  | ^^^^^^
5 | # noqa:F401
6 | # noqa:F401,W203
  |

PGH004 [*] Use a colon when specifying `noqa` rule codes
  --> PGH004_0.py:18:8
   |
17 | # PGH004
18 | x = 2  # noqa X100
   |        ^^^^^^^
19 |
20 | # PGH004
   |
help: Add missing colon
   |
17 | # PGH004
   - x = 2  # noqa X100
18 + x = 2  # noqa: X100
19 |
   |
note: This is an unsafe fix and may change runtime behavior

PGH004 [*] Use a colon when specifying `noqa` rule codes
  --> PGH004_0.py:21:8
   |
20 | # PGH004
21 | x = 2  # noqa X100, X200
   |        ^^^^^^^
22 |
23 | # PGH004
   |
help: Add missing colon
   |
20 | # PGH004
   - x = 2  # noqa X100, X200
21 + x = 2  # noqa: X100, X200
22 |
   |
note: This is an unsafe fix and may change runtime behavior
