Changed footer to also show SLA#199
Conversation
Main -> dev
Changed footer to also show SLA
|
Here's the code health analysis summary for commits Analysis Summary
|
WalkthroughThe pull request introduces a Changes
Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Possibly related PRs
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
sinatra/views/layout.erb (1)
42-46: Tweak footer for accessibility & future-proofing
- Hard-coding the year to “2025” will require manual updates each January.
- The acronym “SLA” is not self-describing for assistive tech; wrapping it in
<abbr>(or adding atitleattribute) improves accessibility.- A small visual separator keeps the two links from running together.
- <span>DynaSearch 🧨 © 2025</span> - <a href="/about">About</a> - <a href="/sla">SLA</a> + <span>DynaSearch 🧨 © <%= Time.now.year %></span> + <a href="/about">About</a><span> | </span> + <a href="/sla"><abbr title="Service Level Agreement">SLA</abbr></a>Ensure the
/slaroute/template exists and is linked intoapp.rb; otherwise this link will 404.
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
sinatra/views/layout.erb(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: e2e
Implemented .rubocop.yml to ignore certain metrics we don't care about
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
sinatra/.rubocop.yml (1)
26-26: Add a newline at EOF to satisfy lintersYAML-lint reports “no new line character at the end of file”.
Add a trailing newline to avoid CI noise.Metrics/ClassLength: Enabled: false +.github/workflows/ci.yaml (1)
67-67: Remove trailing whitespace to keep YAML validLine 67 has a dangling space that YAML-lint flags.
- run: bundle exec rubocop -A + run: bundle exec rubocop -A
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/ci.yaml(1 hunks)sinatra/.rubocop.yml(1 hunks)sinatra/views/layout.erb(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- sinatra/views/layout.erb
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/ci.yaml
[error] 67-67: trailing spaces
(trailing-spaces)
sinatra/.rubocop.yml
[error] 26-26: no new line character at the end of file
(new-line-at-end-of-file)
| # Ignore line length warnings | ||
| Layout/LineLength: | ||
| Enabled: false | ||
|
|
||
| # Ignore warnings about blocks being too long | ||
| Metrics/BlockLength: | ||
| Enabled: false | ||
|
|
||
| # Ignore warnings about methods being too long | ||
| Metrics/MethodLength: | ||
| Enabled: false | ||
|
|
||
| # Ignore warnings about assignment, branch, and condition size | ||
| Metrics/AbcSize: | ||
| Enabled: false | ||
|
|
||
| # Ignore warnings about classes being too long | ||
| Metrics/ClassLength: | ||
| Enabled: false No newline at end of file |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Re-enable metrics cops instead of blanket disabling them
Turning off LineLength, BlockLength, MethodLength, AbcSize, and ClassLength removes most objective safeguards against large, complex, and unreadable code.
If the default thresholds are too strict, prefer custom limits:
-Layout/LineLength:
- Enabled: false
+Layout/LineLength:
+ Max: 120 # or any project-agreed width…repeat for the other cops with Max, Count, or ExcludedMethods instead of Enabled: false.
This keeps CI protection while giving the team flexibility.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Ignore line length warnings | |
| Layout/LineLength: | |
| Enabled: false | |
| # Ignore warnings about blocks being too long | |
| Metrics/BlockLength: | |
| Enabled: false | |
| # Ignore warnings about methods being too long | |
| Metrics/MethodLength: | |
| Enabled: false | |
| # Ignore warnings about assignment, branch, and condition size | |
| Metrics/AbcSize: | |
| Enabled: false | |
| # Ignore warnings about classes being too long | |
| Metrics/ClassLength: | |
| Enabled: false | |
| # Ignore line length warnings | |
| Layout/LineLength: | |
| Max: 120 # or any project-agreed width | |
| # Ignore warnings about blocks being too long | |
| Metrics/BlockLength: | |
| Enabled: false | |
| # Ignore warnings about methods being too long | |
| Metrics/MethodLength: | |
| Enabled: false | |
| # Ignore warnings about assignment, branch, and condition size | |
| Metrics/AbcSize: | |
| Enabled: false | |
| # Ignore warnings about classes being too long | |
| Metrics/ClassLength: | |
| Enabled: false |
🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 26-26: no new line character at the end of file
(new-line-at-end-of-file)
🤖 Prompt for AI Agents
In sinatra/.rubocop.yml between lines 8 and 26, the metrics cops for LineLength,
BlockLength, MethodLength, AbcSize, and ClassLength are completely disabled by
setting Enabled to false. Instead of disabling them, re-enable these cops and
configure custom thresholds using parameters like Max, Count, or ExcludedMethods
to relax the rules as needed. This maintains code quality checks while allowing
flexibility, so replace Enabled: false with appropriate custom limit settings
for each cop.
| - name: Auto-correct RuboCop issues | ||
| working-directory: sinatra | ||
| run: bundle exec rubocop -A || true | ||
| run: bundle exec rubocop -A | ||
|
|
||
| - name: Run RuboCop | ||
| working-directory: sinatra | ||
| run: bundle exec rubocop || true | ||
| run: bundle exec rubocop | ||
|
|
There was a problem hiding this comment.
🛠️ Refactor suggestion
Running rubocop -A in CI silently rewrites code
rubocop -A performs in-place auto-corrections.
Because the CI workspace is thrown away, those changes are never committed, yet the step can pass while masking offences that needed manual review.
Safer pattern:
- - name: Auto-correct RuboCop issues
- working-directory: sinatra
- run: bundle exec rubocop -A
-
- - name: Run RuboCop
+ - name: Run RuboCop
working-directory: sinatra
- run: bundle exec rubocop
+ run: bundle exec rubocop --parallelDevelopers can run rubocop -A locally; CI should only fail or pass.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Auto-correct RuboCop issues | |
| working-directory: sinatra | |
| run: bundle exec rubocop -A || true | |
| run: bundle exec rubocop -A | |
| - name: Run RuboCop | |
| working-directory: sinatra | |
| run: bundle exec rubocop || true | |
| run: bundle exec rubocop | |
| - name: Run RuboCop | |
| working-directory: sinatra | |
| run: bundle exec rubocop --parallel |
🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 67-67: trailing spaces
(trailing-spaces)
🤖 Prompt for AI Agents
In .github/workflows/ci.yaml around lines 65 to 72, the CI step runs `rubocop
-A` which auto-corrects code in place, but these changes are not committed and
can mask offenses. Remove the `rubocop -A` step from the CI workflow so it only
runs `rubocop` to check for offenses without modifying files. Developers can
still run `rubocop -A` locally to fix issues before committing.
Description
Changed footer to also show SLA, as the users didn't have any way of reaching this endpoint, but by typing it manually.
Related Issue:
Fixes #197
Type of Change
How Has This Been Tested?
It has been ran locally in our Docker.dev enviroment, to ensure that the link works properly.
Checklist
Before creating this pull request, please ensure that your code meets the following requirements:
Summary by CodeRabbit