Skip to content
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
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ endif
yarn lint:css
@echo "--- README.md ---"
make lint_readme
@echo "--- lint migrations ---"
make lint_migrations

lint_erb: ## Lints ERB files
bundle exec erblint app/views app/components
Expand All @@ -105,6 +107,9 @@ lint_yaml: normalize_yaml ## Lints YAML files
lint_yarn_workspaces: ## Lints Yarn workspace packages
scripts/validate-workspaces.js

lint_migrations:
scripts/migration_check

lint_gemfile_lock: Gemfile Gemfile.lock ## Lints the Gemfile and its lockfile
@bundle check
@git diff-index --quiet HEAD Gemfile.lock || (echo "Error: There are uncommitted changes after running 'bundle install'"; exit 1)
Expand Down
10 changes: 10 additions & 0 deletions scripts/migration_check
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

if [ -d './db/migrate' ]
then
echo "The ./db/migrate folder should not be used for generating migrations"
echo "Use the --database option to specify the database to be used. Example:"
echo "> rails g migration add_my_database_table --database primary"
echo "Then, remove db/migrate"
exit 1
fi