Skip to content

Commit

Permalink
pre-commit: Add check for double slashes in URL
Browse files Browse the repository at this point in the history
Signed-off-by: Norbert Kamiński <[email protected]>
  • Loading branch information
Norbert Kamiński committed Jul 25, 2023
1 parent f8ab614 commit 19b08c2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ repos:
hooks:
- id: codespell

- repo: local
hooks:
- id: double_slashes_url_external
name: Check double slashes in external URLs
entry: https?:\/\/[^\s]*(?<!http:)((?<!https:)\/\/).*
language: pygrep
exclude: '^.*.(jpeg|jpg|png|pdf)$'
- id: double_slashes_url_markdown
name: Check double slashes in markdown URLs
entry: (\:\s|\()[^\s]*(?<!http:)((?<!https:)\/\/)
language: pygrep
exclude: '^.*.(jpeg|jpg|png|pdf)$'

ci:
autoupdate_commit_msg: 'pre-commit: autoupdate hooks'
autofix_prs: false

0 comments on commit 19b08c2

Please sign in to comment.