Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency credo to v1.7.11 #94

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 15, 2025

This PR contains the following updates:

Package Type Update Change
credo (source) dev minor 1.3.1 -> 1.7.11

Release Notes

rrrene/credo (credo)

v1.7.11

Compare Source

  • Fix compatibility & compiler warnings with Elixir 1.18
  • Fix crashing for invalid strings in issue messages
  • Show required Elixir version for skipped checks
  • Add options :exit_status and :category to format_issue/2 when using Credo.Check
  • Credo.Check.Readability.ModuleDoc fixed false positive
  • Credo.Check.Warning.UnusedEnumOperation fixed false positive
  • Credo.Check.Refactor.ABCSize fixed false positive for tuples and underscored matches (_foo)

v1.7.10

Compare Source

  • Maintenance release

v1.7.9

Compare Source

  • Credo.Check.Refactor.ABCSize fixed false positive for pin operator (^)
  • Credo.Check.Readability.FunctionNames fixed false positive for pow operator (**)
  • Fixed a bug in Credo.Code.Parameters when couting parameters for functions with guards

v1.7.8

Compare Source

  • Credo.Check.Refactor.Apply fixed false positive
  • Credo.Check.Warning.IoInspect fixed false positive
  • Credo.Check.Warning.UnsafeToAtom fixed false positive
  • Credo.Check.Readability.FunctionNames fixed false positive

v1.7.7

Compare Source

  • Fix compatibility & compiler warnings with Elixir 1.17
  • Credo.Check.Design.SkipTestWithoutComment, Credo.Check.Refactor.PassAsyncInTestCases and Credo.Check.Warning.WrongTestFileExtension now work for umbrella apps

v1.7.6

Compare Source

  • Credo.Check.Consistency.MultiAliasImportRequireUse fixed false positive
  • Credo.Check.Readability.PredicateFunctionNames now ignores functions that implement a behaviour
  • Credo.Check.Readability.FunctionName now supports multi-letter sigils
  • Credo.Check.Readability.Specs fixed false positive
  • Credo.Check.Warning.UnusedKeywordOperation fixed false positive
  • Fix column information on several checks in case there are two offending calls on the same line
  • Fix some deprecation warnings for upcoming Elixir 1.17

v1.7.5

Compare Source

  • Fix --read-from-stdin not respecting :files/:included param
  • Credo.Check.Readability.NestedFunctionCalls no longer crashes for functions with an unquoted name

v1.7.4

Compare Source

  • Add new check Credo.Check.Refactor.UtcNowTruncate as opt-in check (this is scheduled to become a standard check in v1.8)
  • Add lots of improvements around :trigger in Credo.Issue
  • Add new output format short
  • Improve docs for several checks
  • Fix another, smaller bottleneck in multicore performance
  • Fix --read-from-stdin not respecting :files param
  • Fix SARIF output format for non-string triggers
  • Fix initializing builtin commands twice
  • Fix diff command not recognizing a git ref as first argument

v1.7.3

Compare Source

  • Credo.Check.Readability.AliasOrder now supports a :sort_method parameter
  • Credo.Check.Readability.PredicateFunctionNames received fixes
  • Credo.Check.Warning.MissedMetadataKeyInLoggerConfig received fixes

v1.7.2

  • Fix compatibility & compiler warnings with Elixir 1.16
  • Fix a bottleneck in multicore performance
  • Cache scope priorities
  • CHANGELOG.md is now included in the package
  • Credo.Check.Readability.NestedFunctionCalls no longer warns on function calls in interpolated strings
  • Credo.Check.Readability.PredicateFunctionNames fixed false positives
  • Credo.Check.Readability.RedundantBlankLines fixed a bug with double quotes multiline strings
  • Credo.Check.Refactor.ModuleDependencies now takes modules for :excluded_namespaces parameter
  • Credo.Check.Refactor.NegatedIsNil no longer leaks memory
  • Credo.Check.Warning.Dbg now warns when part of a pipeline and called without parens
  • Credo.Check.Warning.MissedMetadataKeyInLoggerConfig received various fixes and improvements

v1.7.1

  • Fix compatibility & compiler warnings with Elixir 1.18
  • Fix crashing for invalid strings in issue messages
  • Show required Elixir version for skipped checks
  • Add options :exit_status and :category to format_issue/2 when using Credo.Check
  • Credo.Check.Readability.ModuleDoc fixed false positive
  • Credo.Check.Warning.UnusedEnumOperation fixed false positive
  • Credo.Check.Refactor.ABCSize fixed false positive for tuples and underscored matches (_foo)

v1.7.0

Compare Source

  • Credo.Check.Readability.ModuleDoc works for Phoenix 1.7+ views
  • Credo.Check.Readability.FunctionNames now ignores custom operators
  • Credo.Check.Refactor.Apply now works in pipes
  • Credo.Check.Consistency.ExceptionNames does no longer yield an issue if there is only one match
  • Credo.Check.Readability.ModuleNames now supports an :ignore parameter
  • Credo.Check.Design.AliasUsage now supports an :if_referenced parameter
  • Credo.Check.Readability.FunctionNames now works for acronyms in predicate functions
  • Credo.Check.Readability.NestedFunctionCalls now works for calls already in a pipeline and local function calls
Add SARIF support

Credo 1.7 provides a formatter that will output data in SARIF format, allowing direct GitHub support via the Security tab.

You can now use mix credo --format=sarif to output results in SARIF format.

Add IDs to checks

This was requested for SARIF support and has been added to provide a unique identifier for checks that is more technical than the check name.

Check authors can add IDs to their custom checks by using the :id option:

defmodule MyCheck do
  use Credo.Check,
    id: "EX5042",
    category: :warning,

...

end

Credo's naming scheme for these IDs is simple:

EX5042
^^

EX stands for Elixir.

EX5042
  ^

The first digit represents the category.

EX5042
   ^

The second digit is always 0 for Credo's standard checks (see below).

EX5042
    ^^

The last two digits are the incremental number of the check.

This means that you can extend Credo with

  • up to 99 categories,
  • up to 999 checks per category or
  • use the second digit for something completely different

all while adhering to Credo's own scheme (and of course, you can simply invent a completely different naming scheme for your checks).

Allow passing of multiple files to Mix task

It is now possible to pass a list of files to mix credo.

mix credo lib/foo.ex lib/foo/bar.ex lib/foo/baz.ex

This means that you can now use the output of commands to determine which files to analyse, e.g.:

mix credo $(git diff --name-only)
Ensure stable ordering of analysis results

Continuing our quest to remove ambiguity and reduce undocumented behaviour, Credo now orders its results by default.

Credo's results always had one caveat: Their order was determined by the runtime behaviour of the checks and workers running the checks (it was up to the output mechanism to provide its own stable order).

Now, results are always sorted by check ID, filename and line number.

New checks
  • Credo.Check.Readability.OneArityFunctionInPipe
  • Credo.Check.Readability.OnePipePerLine
  • Credo.Check.Refactor.FilterCount
  • Credo.Check.Refactor.PassAsyncInTestCases
  • Credo.Check.Warning.MissedMetadataKeyInLoggerConfig

v1.6.7

Compare Source

  • Improve compatibility with Elixir 1.14 (based on v1.14.0-rc.1)

v1.6.6

Compare Source

  • Fix error when analysing single-line modules
  • Fix false positive for Credo.Check.Readability.SpaceAroundOperators
  • Fix false positive for Credo.Check.Warning.UnusedStringOperation
  • Fix bug in Credo.Code.Scope.mod_name/1

v1.6.5

Compare Source

  • Include the 'only_greater_than' value in the Credo.Check.Readability.LargeNumbers message
  • Ignore Phoenix.LiveView modules by default
  • Fix for false positive in Credo.Check.Refactor.Apply
  • Fix for false positive in Credo.Check.Refactor.NegatedIsNil
  • Fix for false positive in Credo.Check.Readability.WithSingleClause

v1.6.4

Compare Source

  • Fix for false positive in Credo.Check.Readability.MaxLineLength
  • Fix a bug in Credo.Check.Refactor.PipeChainStart
  • Fix error message in gen.check command

v1.6.3

Compare Source

  • The HTML report generated by --debug now includes slowest files, checks and file/check combinations
  • Fix for false positive in Credo.Check.Consistency.UnusedVariableNames
  • Fix for false positive in Credo.Check.Readability.SpaceAfterCommas
  • Fix a bug in Credo.Check.Warning.ForbiddenModule
  • Fix a bug in Credo.Check.Warning.MixEnv
  • Credo.Check.Readability.LargeNumbers now supports :trailing_digits

v1.6.2

Compare Source

  • Bug fixes
  • Add -i as shorthand for --ignore

v1.6.1

Compare Source

  • Improve compatibility with Elixir 1.13 (based on v1.13.0-rc.1)

v1.6.0

Compare Source

First Run Mode

Credo 1.6 features a new mode, designed to be run every time you introduce Credo to an existing codebase.

mix credo --first-run

This offers a couple of suggestions on how to introduce Credo to your workflow/CI.

All of these suggestions are contextualized and project-specific, here's an example when running it on Credo's codebase:

-------------------------------------- 8< --------------------------------------

v1.5.6

Compare Source

  • Ensure compatibility with Elixir 1.12

v1.5.5

Compare Source

  • Fix bug where compilation warnings are shown if compilation directory is not part of a Git work tree
  • Fix bug in mix credo diff where too many issues are reported because

v1.5.4

Compare Source

  • Fix bug where :exit_status was not a valid option for use Credo.Check
  • Fix bug where mix credo diff exited with a non-zero exit status even if no issues were shown
  • mix credo diff now fails with an error if the given ref was not found

v1.5.3

Compare Source

  • Fix bug in diff and version command when git is not installed

v1.5.2

Compare Source

  • Fix output bug in diff command
  • Fix bug in diff command when run on a Git ref that does not contain a given --config-name
  • Fix bug in all commands when a given --config-name is not found
  • Fix false positive in Credo.Check.Warning.ExpensiveEmptyEnumCheck
  • Fix false positive in Credo.Check.Refactor.PipeChainStart regarding custom operators
  • Fix --version to include pre version and build info for unpublished versions (e.g. when the dep is included via path: or github:)

v1.5.1

Compare Source

  • Fix bug in diff command when run on a subdirectory of a Git repository
  • Fix bug in new general param :files when excluding files

v1.5.0

Compare Source

  • Credo now requires Elixir 1.7 or newer
  • Refactor check runner (much faster now for common scenarios)
  • Add param allow_acronyms to check Credo.Check.Readability.FunctionNames
  • Add name of check to message when printing issues with --verbose
  • Add support for "dynamic" tagging for checks via .credo.exs

Overwrite all tags for FooCheck

  {FooCheck, [tags: [:my_tag]]}

Add tags for FooCheck

  {SomeCredoCheck, [tags: [:__initial__, :my_tag]]}

Tags can then be used as usual, via the CLI switch --checks-with[out]-tag:

Only run checks tagged :my_tag during analysis

  $ mix credo --checks-with-tag my_tag

Exclude all checks tagged :my_tag from analysis

  $ mix credo --checks-without-tag my_tag
New switch to enable file watcher

You can now ask Credo to re-run on file changes:

  $ mix credo --watch
New diff command

You can now ask Credo to only report changes in files that were changed since a given Git ref:

  $ mix credo diff HEAD^
  $ mix credo diff master

You can, of course, combine this with the new --watch switch to iteratively fix issues that have come up since the last release:

  $ mix credo diff v1.4.0 --watch
New general check param :files

You can now include/exclude specific files or patterns for specific checks.

The syntax is the same as for the top-level :files key:

v1.4.1

Compare Source

  • Ensure compatibility with Elixir 1.11.0

v1.4.0

Compare Source

  • Credo's schema for pre-release names changes: There is now a . after the rc like in many other Elixir projects.

  • Add support for explaining checks (in addition to issues), i.e.

    $ mix credo explain Credo.Check.Design.AliasUsage
    
  • Add support for tags on checks

    Checks can now declare tags via the __using__ macro, i.e.

    defmodule MyCheck do
      use Credo.Check, tags: [:foo]
    
      def run(%SourceFile{} = source_file, params) do
        #
      end
    end
    

    Tags can be used via the CLI switch --checks-with[out]-tag:

Only run checks tagged :foo during analysis

  $ mix credo --checks-with-tag foo

Exclude all checks tagged :foo from analysis

  $ mix credo --checks-without-tag foo
  • Add validation of check params in config

    If a param is not found, Credo checks for mispellings and suggests corrections:

    $ mix credo
    ** (config) Credo.Check.Design.AliasUsage: unknown param `fi_called_more_often_than`. Did you mean `if_called_more_often_than`?
    
  • Add auto-generated check docs

  • Add new documentation on Hex with extra guides and CHANGELOG

v1.3.2

Compare Source

  • Support non-ascii characters in variable names
  • Fix false positive in Credo.Check.Readability.ParenthesesOnZeroArityDefs

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

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.

0 participants