Skip to content

Fix linter errors when running strict checks - #2

Open
inzyster wants to merge 1 commit into
OnlyXuul:mainfrom
inzyster:fix/lint-errors
Open

Fix linter errors when running strict checks#2
inzyster wants to merge 1 commit into
OnlyXuul:mainfrom
inzyster:fix/lint-errors

Conversation

@inzyster

Copy link
Copy Markdown

Background

I've been using this library in my projects, and I always run linting checks like so:
odin check . -vet -strict-style -disallow-do -warnings-as-errors as both a pre-commit hook and in my CI workflows. As a result, the linter raised a few diagnostics in this library's code.

Solution

  • Removed the import from afmt_posix.odin
  • Replaced the name variable shadowing in print_color_guide and print_color_guide_ex in colors.odin with assignment
  • Replaced the color variable shadowing in rgb_to_8bit in afmt.odin with a new name (_color)

Validation

To validate the changes, run the linter:
odin check . -vet -strict-style -disallow-do -warnings-as-errors -no-entry-point

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