Skip to content

Comments

Fix typos & improve jenkinsfile#5007

Merged
IvanIvanoff merged 2 commits intomasterfrom
improve-jenkinsfile
Feb 18, 2026
Merged

Fix typos & improve jenkinsfile#5007
IvanIvanoff merged 2 commits intomasterfrom
improve-jenkinsfile

Conversation

@IvanIvanoff
Copy link
Member

@IvanIvanoff IvanIvanoff commented Feb 18, 2026

  • Fix typos
  • Add mix compile to Dockerfile-test so the 4 partitions do not compile each

Changes

Ticket

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have tried to find clearer solution before commenting hard-to-understand parts of code
  • I have added tests that prove my fix is effective or that my feature works

Summary by CodeRabbit

  • Documentation

    • Fixed spelling errors and grammar issues in documentation strings, comments, and error messages throughout the codebase for improved clarity.
  • Chores

    • Enhanced the test build pipeline by adding a compilation verification step to ensure code integrity before test execution.

@coderabbitai
Copy link

coderabbitai bot commented Feb 18, 2026

📝 Walkthrough

Walkthrough

This pull request adds a compilation step to the test Dockerfile and corrects numerous spelling, grammar, and typography errors across documentation strings, comments, and error messages throughout the codebase. No functional logic is altered.

Changes

Cohort / File(s) Summary
Build Configuration
Dockerfile-test
Added RUN mix compile step to ensure project compilation before tests.
Error Message Corrections
lib/sanbase/discord_bot/command_handler.ex, lib/sanbase/queries/authorization.ex, lib/sanbase_web/controllers/telegram_controller.ex, lib/sanbase_web/graphql/resolvers/project/project_transfers_resolver.ex
Fixed typos in user-facing error messages and log messages ("errror" → "error", "in a hour" → "in an hour", "succesfully" → "successfully", removed duplicate word "for").
Documentation String Corrections
lib/sanbase/alerts/evaluator/scheduler.ex, lib/sanbase/dashboards/dashboards.ex, lib/sanbase/event_bus/event_emitter.ex, lib/sanbase/external_services/coinmarketcap/ticker_fetcher.ex, lib/sanbase/menu/menus.ex, lib/sanbase/metric/metric.ex, lib/sanbase/signal/signal.ex, lib/sanbase/transfers/eth_transfers.ex, lib/sanbase/utils/math.ex, lib/sanbase_web/endpoint.ex, lib/sanbase_web/graphql/.../cache.ex, lib/sanbase_web/graphql/.../file_resolver.ex, lib/sanbase_web/graphql/.../menu_queries.ex, lib/sanbase_web/graphql/.../project_types.ex, lib/sanbase_web/plug/basic_auth.ex, lib/sanbase_web/plug/bot_login_plug.ex, lib/sanbase_web/plug/telegram_match_plug.ex, lib/sanbase_web/graphql/absinthe_before_send.ex
Corrected spelling, grammar, and typography in docstrings and inline comments ("occured" → "occurred", "enviroment" → "environment", "comming" → "coming", "accomodate" → "accommodate", removed duplicate words, fixed grammar inconsistencies).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

Poem

🐰 With whiskers twitched and careful eye,
I fix each typo passing by—
"Occurred" and "coming" now ring true,
These small corrections make things new!
✨ A test compile, a message clear,
Our code hops onward without fear.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 77.78% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: fixing typos throughout the codebase and improving the Dockerfile-test by adding a build step.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch improve-jenkinsfile

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
lib/sanbase/alerts/evaluator/scheduler.ex (1)

381-408: ⚠️ Potential issue | 🟡 Minor

Missed typo: atom key total_sent_succesfully on Line 405 was not fixed.

The PR fixes the comment typo on line 381 (successfully) but the map key returned from this same function still uses the misspelled atom:

total_sent_succesfully: total_triggered - total_failed,

Since handle_send_results_list/2 is defp and its only call site (Line 318) only destructures last_triggered, renaming the atom is safe.

✏️ Proposed fix
-      total_sent_succesfully: total_triggered - total_failed,
+      total_sent_successfully: total_triggered - total_failed,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/sanbase/alerts/evaluator/scheduler.ex` around lines 381 - 408, The
returned map from handle_send_results_list/2 contains a misspelled atom key
total_sent_succesfully; rename it to total_sent_successfully in the map returned
by handle_send_results_list/2 (and update any references if present) so the
correct key is emitted; locate the atom in the function
handle_send_results_list/2 and change total_sent_succesfully: total_triggered -
total_failed to total_sent_successfully: total_triggered - total_failed.
lib/sanbase_web/graphql/cache/cache.ex (1)

4-5: ⚠️ Potential issue | 🟡 Minor

Two remaining typos in the module docstring were missed.

  • "for a some time""for some time"
  • "precalculating itt""precalculating it"
✏️ Proposed fix
-  caches the result of the resolver for a some time instead of precalculating itt
+  caches the result of the resolver for some time instead of precalculating it
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/sanbase_web/graphql/cache/cache.ex` around lines 4 - 5, The module
docstring in the Cache module contains two typos; update the documentation
string in the module (module Cache in lib/sanbase_web/graphql/cache/cache.ex) to
change "for a some time" to "for some time" and "precalculating itt" to
"precalculating it" so the docstring reads correctly.
lib/sanbase/discord_bot/command_handler.ex (2)

432-432: ⚠️ Potential issue | 🟡 Minor

Missed typo: "reactiing""reacting" in the embed description.

Since this PR is specifically fixing typos, this one slipped through.

✏️ Proposed fix
-"<@#{to_string(msg.author.id)}> I am still learning and improving, please let me know how I did by reactiing below"
+"<@#{to_string(msg.author.id)}> I am still learning and improving, please let me know how I did by reacting below"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/sanbase/discord_bot/command_handler.ex` at line 432, In the embed
description string sent in the command handler (the text beginning
"<@#{to_string(msg.author.id)}> I am still learning and improving, please let me
know how I did by reactiing below"), fix the typo "reactiing" to "reacting" so
the message reads "...please let me know how I did by reacting below"; this
change is located in the command handling code that constructs the reply embed
string (refer to the description literal containing to_string(msg.author.id)).

623-623: ⚠️ Potential issue | 🟠 Major

Pre-existing bug: "last 2 weeks" shifts by -14 weeks instead of -2.

Timex.shift(DateTime.utc_now(), weeks: -14) shifts back ~3.5 months rather than 2 weeks. This is almost certainly a copy-paste typo.

🐛 Proposed fix
-defp text_to_datetime("last 2 weeks"), do: Timex.shift(DateTime.utc_now(), weeks: -14)
+defp text_to_datetime("last 2 weeks"), do: Timex.shift(DateTime.utc_now(), weeks: -2)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/sanbase/discord_bot/command_handler.ex` at line 623, The clause in the
text_to_datetime function for the literal "last 2 weeks" uses
Timex.shift(DateTime.utc_now(), weeks: -14) which is incorrect; update the
clause (the defp text_to_datetime("last 2 weeks") pattern) to call Timex.shift
with weeks: -2 so it shifts back two weeks instead of fourteen.
🧹 Nitpick comments (1)
lib/sanbase_web/plug/basic_auth.ex (1)

2-5: Typo fix is correct, but the moduledoc content appears inaccurate.

The "coming" typo fix is good. However, the moduledoc describes checking a path "coming from telegram" with a secret endpoint — this seems copied from TelegramMatchPlug. Since this is the BasicAuth plug (which delegates to Plug.BasicAuth.basic_auth/2), consider updating the description to accurately reflect what this module does.

📝 Suggested moduledoc fix
   `@moduledoc` ~s"""
-  Checks the path if it is really coming from telegram. The endpoint is a secret
-  and is only known by telegram.
+  Applies HTTP Basic Authentication using credentials from the application config.
   """
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/sanbase_web/plug/basic_auth.ex` around lines 2 - 5, The moduledoc in the
BasicAuth plug incorrectly describes Telegram-specific behavior; update it to
state that the module enforces HTTP Basic Authentication by delegating to
Plug.BasicAuth.basic_auth/2 (i.e., performs basic auth check against configured
username/password), remove any mention of Telegram or secret endpoints, and
briefly document expected options/usage for the BasicAuth plug (module name
BasicAuth and its delegation to Plug.BasicAuth.basic_auth/2).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@lib/sanbase_web/graphql/cache/cache.ex`:
- Around line 4-5: The module docstring in the Cache module contains two typos;
update the documentation string in the module (module Cache in
lib/sanbase_web/graphql/cache/cache.ex) to change "for a some time" to "for some
time" and "precalculating itt" to "precalculating it" so the docstring reads
correctly.

In `@lib/sanbase/alerts/evaluator/scheduler.ex`:
- Around line 381-408: The returned map from handle_send_results_list/2 contains
a misspelled atom key total_sent_succesfully; rename it to
total_sent_successfully in the map returned by handle_send_results_list/2 (and
update any references if present) so the correct key is emitted; locate the atom
in the function handle_send_results_list/2 and change total_sent_succesfully:
total_triggered - total_failed to total_sent_successfully: total_triggered -
total_failed.

In `@lib/sanbase/discord_bot/command_handler.ex`:
- Line 432: In the embed description string sent in the command handler (the
text beginning "<@#{to_string(msg.author.id)}> I am still learning and
improving, please let me know how I did by reactiing below"), fix the typo
"reactiing" to "reacting" so the message reads "...please let me know how I did
by reacting below"; this change is located in the command handling code that
constructs the reply embed string (refer to the description literal containing
to_string(msg.author.id)).
- Line 623: The clause in the text_to_datetime function for the literal "last 2
weeks" uses Timex.shift(DateTime.utc_now(), weeks: -14) which is incorrect;
update the clause (the defp text_to_datetime("last 2 weeks") pattern) to call
Timex.shift with weeks: -2 so it shifts back two weeks instead of fourteen.

---

Nitpick comments:
In `@lib/sanbase_web/plug/basic_auth.ex`:
- Around line 2-5: The moduledoc in the BasicAuth plug incorrectly describes
Telegram-specific behavior; update it to state that the module enforces HTTP
Basic Authentication by delegating to Plug.BasicAuth.basic_auth/2 (i.e.,
performs basic auth check against configured username/password), remove any
mention of Telegram or secret endpoints, and briefly document expected
options/usage for the BasicAuth plug (module name BasicAuth and its delegation
to Plug.BasicAuth.basic_auth/2).

@IvanIvanoff IvanIvanoff changed the title improve jenkinsfile Fix typos & improve jenkinsfile Feb 18, 2026
@IvanIvanoff IvanIvanoff merged commit 69b84fa into master Feb 18, 2026
3 checks passed
@IvanIvanoff IvanIvanoff deleted the improve-jenkinsfile branch February 18, 2026 12:51
@IvanIvanoff IvanIvanoff mentioned this pull request Feb 18, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant