com um clique
rubocop
Run RuboCop linting and fix offenses for the redmine_ai_helper plugin
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Run RuboCop linting and fix offenses for the redmine_ai_helper plugin
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.
Connect to the running Redmine instance and log in via the Playwright MCP browser, using REDMINE_PLAYRIGHT_URL/REDMINE_PLAYRIGHT_USER/REDMINE_PLAYRIGHT_PASSWORD environment variables. Use whenever the user asks to open, check, access, or test something in the running Redmine UI (e.g. verifying a feature in the browser, taking a screenshot of a page, manually exercising a flow).
Stage the current changes and create a git commit with a properly formatted English message. Use whenever the user asks to commit, save, or check in their work. Picks a Conventional-Commits-style prefix (fix:, feat:, refactor:, docs:, test:, chore:, style:, perf:) based on the actual diff, keeps the first line a concise summary, and adds a bullet list of details only when the change touches several things.
Execute the implementation plan by processing and executing all tasks defined in tasks.md
Execute the implementation planning workflow using the plan template to generate design artifacts.
Create or update the feature specification from a natural language feature description.
| name | rubocop |
| description | Run RuboCop linting and fix offenses for the redmine_ai_helper plugin |
Run RuboCop on the plugin codebase, auto-fix what is safe, and manually resolve remaining offenses.
rubocop 2>&1
rubocop -A --except Rails/ActionControllerTestCase 2>&1
Exclude Rails/ActionControllerTestCase — Redmine plugin tests require ActionController::TestCase. Converting to ActionDispatch::IntegrationTest breaks the tests helper method and other controller-specific APIs.
Address any offenses that remain after auto-correction using the guidelines below.
IMPORTANT: Never modify
.rubocop.ymlthresholds (Max:values) orExclude:settings without explicit user approval. If offenses cannot be fixed in the source code, report them to the user and ask how to proceed. Do not raiseMax:values, add newExclude:entries, or rungit checkout -- .rubocop.ymlto work around violations.
| Cop | Action |
|---|---|
Rails/Pluck | If called on a plain Ruby array (not ActiveRecord), add # rubocop:disable Rails/Pluck inline |
Rails/RedundantPresenceValidationOnBelongsTo | If tests assert errors[:foreign_key_id], the explicit validation is needed — add # rubocop:disable inline |
Rails/I18nLocaleAssignment | Rewrite I18n.locale = x as an I18n.with_locale(x) { ... } block |
| Cop disabled project-wide | Add Enabled: false under the cop name in .rubocop.yml — only with user approval |
bundle exec rake redmine:plugins:test NAME=redmine_ai_helper 2>&1 | tail -20
Confirm 0 failures and 0 errors before finishing.
Rails/ActionControllerTestCaseAlready disabled in .rubocop.yml. No changes needed.
Rails/ActionControllerTestCase:
Enabled: false
Rails/RedundantPresenceValidationOnBelongsToThe implicit belongs_to validation puts errors on :association_name, not :foreign_key_id. If tests check errors[:project_id] or errors[:user_id], keep the explicit validation:
validates :project_id, presence: true # rubocop:disable Rails/RedundantPresenceValidationOnBelongsTo
validates :user_id, presence: true # rubocop:disable Rails/RedundantPresenceValidationOnBelongsTo
Rails/Pluck.pluck is an ActiveRecord method and does not work on plain Ruby arrays. Disable inline:
issue_counts = members_workload.map { |m| m[:assigned_issues] } # rubocop:disable Rails/Pluck
Rails/I18nLocaleAssignment# Before
original_locale = I18n.locale
I18n.locale = :ja
# ... test code
ensure
I18n.locale = original_locale
# After
I18n.with_locale(:ja) do
# ... test code
end