Skip to content

Instantly share code, notes, and snippets.

@invidian
Created May 4, 2022 12:27
Show Gist options
  • Select an option

  • Save invidian/bf8db8741a28a60aa95f9953adf9641b to your computer and use it in GitHub Desktop.

Select an option

Save invidian/bf8db8741a28a60aa95f9953adf9641b to your computer and use it in GitHub Desktop.

Revisions

  1. invidian created this gist May 4, 2022.
    19 changes: 19 additions & 0 deletions .semgrep.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    rules:
    - id: files-must-not-have-trailing-whitespace
    patterns:
    - pattern-regex: '[[:blank:]]$'
    message: Files must not have any trailing whitespace.
    languages: [generic]
    severity: ERROR
    - id: files-must-not-have-trailing-newlines
    patterns:
    - pattern-regex: '\n\n\Z'
    message: Files must not have any trailing newlines.
    languages: [generic]
    severity: ERROR
    - id: all-lines-must-end-with-newline
    patterns:
    - pattern-regex: '\S\z'
    message: All lines must end with newline.
    languages: [generic]
    severity: ERROR