diff --git a/.hound.yml b/.hound.yml new file mode 100644 index 000000000..67a0668db --- /dev/null +++ b/.hound.yml @@ -0,0 +1,4 @@ +rubocop: + config_file: .rubocop_basic.yml +scss: + config_file: .scss-lint.yml diff --git a/.rubocop.yml b/.rubocop.yml index 93a1a6ce9..07a45ca67 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,35 +1,4 @@ -inherit_from: .rubocop_todo.yml -require: rubocop-rspec - -AllCops: - DisplayCopNames: true - DisplayStyleGuide: true - Include: - - '**/Rakefile' - - '**/config.ru' - Exclude: - - 'db/**/*' - - 'config/**/*' - - 'script/**/*' - TargetRubyVersion: 2.3 - # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop - # to ignore them, so only the ones explicitly set in this file are enabled. - DisabledByDefault: true - -Metrics/LineLength: - Max: 100 - -Layout/IndentationConsistency: - EnforcedStyle: rails - -Layout/EndOfLine: - EnforcedStyle: lf - -Layout/TrailingBlankLines: - Enabled: true - -Layout/TrailingWhitespace: - Enabled: true +inherit_from: .rubocop_basic.yml Bundler/DuplicatedGem: Enabled: true @@ -280,9 +249,6 @@ RSpec/DescribeMethod: RSpec/DescribeSymbol: Enabled: true -RSpec/DescribedClass: - Enabled: true - RSpec/EmptyExampleGroup: Enabled: true @@ -367,9 +333,6 @@ RSpec/NestedGroups: Enabled: true Max: 4 -RSpec/NotToNot: - Enabled: true - RSpec/OverwritingSetup: Enabled: true diff --git a/.rubocop_basic.yml b/.rubocop_basic.yml new file mode 100644 index 000000000..cebf55084 --- /dev/null +++ b/.rubocop_basic.yml @@ -0,0 +1,40 @@ +require: rubocop-rspec + +AllCops: + DisplayCopNames: true + DisplayStyleGuide: true + Include: + - '**/Rakefile' + - '**/config.ru' + Exclude: + - 'db/**/*' + - 'config/**/*' + - 'script/**/*' + TargetRubyVersion: 2.3 + # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop + # to ignore them, so only the ones explicitly set in this file are enabled. + DisabledByDefault: true + +Layout/IndentationConsistency: + EnforcedStyle: rails + +Layout/IndentationWidth: + Enabled: true + +Layout/EndOfLine: + EnforcedStyle: lf + +Layout/TrailingBlankLines: + Enabled: true + +Layout/TrailingWhitespace: + Enabled: true + +Metrics/LineLength: + Max: 100 + +RSpec/NotToNot: + Enabled: true + +Style/StringLiterals: + EnforcedStyle: double_quotes diff --git a/db/schema.rb b/db/schema.rb index 21e0814b5..37bfbbaa6 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -619,7 +619,7 @@ ActiveRecord::Schema.define(version: 20180924071722) do t.string "locale", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.text "title" + t.string "title" t.text "changelog" t.text "body" t.text "body_html" @@ -1218,17 +1218,17 @@ ActiveRecord::Schema.define(version: 20180924071722) do add_index "site_customization_images", ["name"], name: "index_site_customization_images_on_name", unique: true, using: :btree create_table "site_customization_page_translations", force: :cascade do |t| - t.integer "site_customization_page_id", null: false - t.string "locale", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "title" - t.string "subtitle" - t.text "content" - end + t.integer "site_customization_page_id", null: false + t.string "locale", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "title" + t.string "subtitle" + t.text "content" + end - add_index "site_customization_page_translations", ["locale"], name: "index_site_customization_page_translations_on_locale", using: :btree - add_index "site_customization_page_translations", ["site_customization_page_id"], name: "index_7fa0f9505738cb31a31f11fb2f4c4531fed7178b", using: :btree + add_index "site_customization_page_translations", ["locale"], name: "index_site_customization_page_translations_on_locale", using: :btree + add_index "site_customization_page_translations", ["site_customization_page_id"], name: "index_7fa0f9505738cb31a31f11fb2f4c4531fed7178b", using: :btree create_table "site_customization_pages", force: :cascade do |t| t.string "slug", null: false