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

Update credo 1.6.7 → 1.7.6 (minor) #24

Closed
wants to merge 1 commit into from

Conversation

depfu[bot]
Copy link
Contributor

@depfu depfu bot commented May 10, 2024

Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ credo (1.6.7 → 1.7.6) · Repo · Changelog

Release Notes

1.7.6

Check it out on Hex: https://hex.pm/packages/credo/1.7.6

  • 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

1.7.5 (from changelog)

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

1.7.4

Check it out on Hex: https://hex.pm/packages/credo/1.7.4

  • 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

1.7.3 (from changelog)

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

1.7.2 (from changelog)

  • 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

1.7.1 (from changelog)

  • Fix compatibility & compiler warnings with Elixir 1.15
  • Improve docs
  • Credo.Check.Readability.Specs works for parensless definitions

1.7.0 (from changelog)

  • 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

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ bunt (indirect, 0.2.1 → 1.0.0) · Repo

Commits

See the full diff on Github. The new version differs by 39 commits:

↗️ file_system (indirect, 0.2.10 → 1.0.0) · Repo

Commits

See the full diff on Github. The new version differs by 14 commits:

↗️ jason (indirect, 1.4.0 → 1.4.1) · Repo · Changelog

Release Notes

1.4.1 (from changelog)

  • Add limit to decoded integer sizes of 1024 digits. This can be changed with the decoding_integer_digit_limit app env config.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 14 commits:


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu bot added the depfu label May 10, 2024
Copy link

codecov bot commented May 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (1f04f56) to head (3ff2c1d).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #24   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines           87        87           
=========================================
  Hits            87        87           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor Author

depfu bot commented Jun 13, 2024

Closed in favor of #25.

@depfu depfu bot closed this Jun 13, 2024
@depfu depfu bot deleted the depfu/update/elixir/credo-1.7.6 branch June 13, 2024 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants