The personal finance app for everyone (by everyone)
Ruby
inherit_gem:
rubocop-rails-omakase: rubocop.yml
require:
- ./lib/rubocop/cop/sure/sorted_list
- ./lib/rubocop/cop/sure/no_ai_env
Sure/SortedList:
Enabled: true
# AI configuration isn't read from ENV. Ai::LegacyEnvConfig reads the deprecated variables, and
# migrations are history. The allowlist is code that still reads them, with the feature it serves.
# This list only shrinks: test/lib/rubocop/cop/sure/no_ai_env_test.rb fails on an entry with
# nothing left to flag.
Sure/NoAiEnv:
Enabled: true
Include:
- "app/**/*.rb"
- "config/**/*.rb"
- "lib/**/*.rb"
Exclude:
- "app/models/ai/legacy_env_config.rb"
- "db/migrate/**/*"
# allowlist
- "app/controllers/settings/hostings_controller.rb" # settings pages
- "app/models/ai_health.rb" # health page
- "app/models/ai_health/probe.rb" # health probes
- "app/models/assistant/external.rb" # chat
- "app/models/assistant/responder.rb" # chat
- "app/models/assistant/token_budget.rb" # chat
- "app/models/chat.rb" # chat
- "app/models/eval/provider_factory.rb" # evals
- "app/models/family/ai_promptable.rb" # prompt overrides
- "app/models/family/ai_settings.rb" # family settings
- "app/models/provider/anthropic.rb" # chat
- "app/models/provider/anthropic/auto_categorizer.rb" # categorization
- "app/models/provider/anthropic/auto_merchant_detector.rb" # merchant detection
- "app/models/provider/anthropic/bank_statement_extractor.rb" # PDF import
- "app/models/provider/anthropic/bill_setup_suggester.rb" # bill setup
- "app/models/provider/anthropic/pdf_processor.rb" # PDF import
- "app/models/provider/anthropic/provider_merchant_enhancer.rb" # merchant enhancement
- "app/models/provider/jev.rb" # Jev
- "app/models/provider/llm_concept.rb" # LLM calls
- "app/models/provider/openai.rb" # chat
- "app/models/provider/openai/concerns/json_mode.rb" # JSON mode
- "app/models/provider/registry.rb" # provider lookup
- "app/models/setting.rb" # settings pages
- "app/models/vector_store/pgvector.rb" # embeddings
Layout/IndentationWidth:
Enabled: true
Layout/IndentationStyle:
EnforcedStyle: spaces
IndentationWidth: 2
Layout/IndentationConsistency:
Enabled: true
Layout/SpaceInsidePercentLiteralDelimiters:
Enabled: true
Layout/SpaceInsideArrayLiteralBrackets:
Exclude:
- "db/schema.rb"