You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With rule above, and # ast-grep-ignore: empty_init_files as first line in the module, ast-grep complains about /my/path/__init__.py:1:1: error[empty_init_files]: init.py files should be empty aside from imports but also /my/path/__init__.py:1:1: help[unused-suppression]: Unused '@ast-grep-ignore' directive.
🙂 Expected behavior
Placing module suppression on very first line should result in this rule being ignored and ast-grep scan passing.
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered:
Please read the FAQ for the bug you encountered.
⏯ Playground Link
https://ast-grep.github.io/playground.html#eyJtb2RlIjoiQ29uZmlnIiwibGFuZyI6InB5dGhvbiIsInF1ZXJ5IjoiY29uc29sZS5sb2coJE1BVENIKSIsInJld3JpdGUiOiJsb2dnZXIubG9nKCRNQVRDSCkiLCJzdHJpY3RuZXNzIjoic21hcnQiLCJzZWxlY3RvciI6IiIsImNvbmZpZyI6Ii0tLVxuaWQ6IGVtcHR5X2luaXRfZmlsZXNcbmxhbmd1YWdlOiBQeXRob25cbnNldmVyaXR5OiBlcnJvclxubWVzc2FnZTogfFxuICBgX19pbml0X18ucHlgIGZpbGVzIHNob3VsZCBiZSBlbXB0eSBhc2lkZSBmcm9tIGltcG9ydHNcblxucnVsZTpcbiAga2luZDogbW9kdWxlXG4gIGhhczpcbiAgICBub3Q6XG4gICAgICBhbnk6XG4gICAgICAgIC0ga2luZDogaW1wb3J0X2Zyb21fc3RhdGVtZW50XG4gICAgICAgIC0ga2luZDogaW1wb3J0X3N0YXRlbWVudFxuXG5maWxlczpcbiAgLSAnKiovX19pbml0X18ucHknXG4iLCJzb3VyY2UiOiIjIGFzdC1ncmVwLWlnbm9yZTogZW1wdHlfaW5pdF9maWxlc1xuZnJvbSBmb28gaW1wb3J0IGJhclxuaW1wb3J0IGZvb1xuXG5mb28gPSBiYXIifQ==
💻 Code
🙁 Actual behavior
With rule above, and
# ast-grep-ignore: empty_init_files
as first line in the module, ast-grep complains about/my/path/__init__.py:1:1: error[empty_init_files]:
init.pyfiles should be empty aside from imports
but also/my/path/__init__.py:1:1: help[unused-suppression]: Unused '@ast-grep-ignore' directive.
🙂 Expected behavior
Placing module suppression on very first line should result in this rule being ignored and ast-grep scan passing.
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: