Skip to content

Commit

Permalink
Prevent creation of .md-e files in the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvkb committed Feb 15, 2024
1 parent 002066f commit 82bc490
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
11 changes: 6 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ repos:
entry: bash -c 'if [ ! -f "$(dirname "$dir")"/frontend/src/locales/ar.json ]; then just frontend/run i18n; fi'
language: system
pass_filenames: false

# Replace ```console code block with ```bash in our documentation
- id: fix-console-code-block
name: Ensure "bash" code block is used over "console"
files: ^documentation/.*\.md$
# Check that we are not using the ```console block in our documentation
# -R recursively checks files
# -l suppresses normal input and only lists files with errors
# Print an error message if any files are found
entry: sed -i -e 's/```console/```bash/g'
# -i: edit in place (no argument means no backup)
# -p: loop over all files provided, print error message if file cannot be opened
# -e: use the code provided inline
entry: perl -i -pe 's/```console/```bash/g'
language: system

- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down
12 changes: 6 additions & 6 deletions ingestion_server/test/update_mocks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ docker run \
EOF

# Remove search path so we can refer to the public schema implicitly
sed -i "" '/search_path/d' mock_schemas/image.sql
sed -i "" '/search_path/d' mock_schemas/audio.sql
sed -i "" '/search_path/d' mock_schemas/audioset.sql
sed -i "" '/search_path/d' mock_schemas/image_view.sql
sed -i "" '/search_path/d' mock_schemas/audio_view.sql
sed -i "" '/search_path/d' mock_schemas/audioset_view.sql
perl -i -pe '/search_path/d' mock_schemas/image.sql
perl -i -pe '/search_path/d' mock_schemas/audio.sql
perl -i -pe '/search_path/d' mock_schemas/audioset.sql
perl -i -pe '/search_path/d' mock_schemas/image_view.sql
perl -i -pe '/search_path/d' mock_schemas/audio_view.sql
perl -i -pe '/search_path/d' mock_schemas/audioset_view.sql

# Select some media samples and export them to CSV
docker run \
Expand Down

0 comments on commit 82bc490

Please sign in to comment.