Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent creation of .md-e files in the docs #3799

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading