Skip to content

Commit

Permalink
Changes for rewrite 1.0.0 (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
NickNeck authored Nov 10, 2024
1 parent 5bbd74e commit f961939
Show file tree
Hide file tree
Showing 57 changed files with 1,134 additions and 928 deletions.
4 changes: 3 additions & 1 deletion .dialyzer_ignore.exs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[
~r|lib/mix/tasks/recode.ex:.*:no_return|
~r|lib/mix/tasks/recode.ex:.*:no_return|,
~r|lib/recode/runner/impl.ex:223:apply|,
~r|lib/recode/runner/impl.ex:228:call|
]
35 changes: 16 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Created with GitHubActions version 0.2.24
# Created with GitHubActions version 0.2.25
name: CI
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -16,40 +16,40 @@ jobs:
- '1.14.5'
- '1.15.8'
- '1.16.3'
- '1.17.2'
- '1.17.3'
otp:
- '22.3'
- '23.3'
- '24.3'
- '25.3'
- '26.2'
- '27.0'
- '27.1'
exclude:
- elixir: '1.13.4'
otp: '26.2'
- elixir: '1.13.4'
otp: '27.0'
otp: '27.1'
- elixir: '1.14.5'
otp: '22.3'
- elixir: '1.14.5'
otp: '27.0'
otp: '27.1'
- elixir: '1.15.8'
otp: '22.3'
- elixir: '1.15.8'
otp: '23.3'
- elixir: '1.15.8'
otp: '27.0'
otp: '27.1'
- elixir: '1.16.3'
otp: '22.3'
- elixir: '1.16.3'
otp: '23.3'
- elixir: '1.16.3'
otp: '27.0'
- elixir: '1.17.2'
otp: '27.1'
- elixir: '1.17.3'
otp: '22.3'
- elixir: '1.17.2'
- elixir: '1.17.3'
otp: '23.3'
- elixir: '1.17.2'
- elixir: '1.17.3'
otp: '24.3'
steps:
- name: Checkout
Expand All @@ -74,28 +74,25 @@ jobs:
with:
path: test/support/plts
key: test/support/plts-${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
if: ${{ contains(matrix.elixir, '1.17.2') && contains(matrix.otp, '27.0') }}
if: ${{ contains(matrix.elixir, '1.17.3') && contains(matrix.otp, '27.1') }}
- name: Get dependencies
run: mix deps.get
- name: Compile dependencies
run: MIX_ENV=test mix deps.compile
- name: Compile project
run: MIX_ENV=test mix compile --warnings-as-errors
- name: Check unused dependencies
if: ${{ contains(matrix.elixir, '1.17.2') && contains(matrix.otp, '27.0') }}
run: mix deps.unlock --check-unused
- name: Check code format
if: ${{ contains(matrix.elixir, '1.17.2') && contains(matrix.otp, '27.0') }}
if: ${{ contains(matrix.elixir, '1.17.3') && contains(matrix.otp, '27.1') }}
run: mix format --check-formatted
- name: Lint code
if: ${{ contains(matrix.elixir, '1.17.2') && contains(matrix.otp, '27.0') }}
if: ${{ contains(matrix.elixir, '1.17.3') && contains(matrix.otp, '27.1') }}
run: mix credo --strict
- name: Run tests
run: mix test
if: ${{ !(contains(matrix.elixir, '1.17.2') && contains(matrix.otp, '27.0')) }}
if: ${{ !(contains(matrix.elixir, '1.17.3') && contains(matrix.otp, '27.1')) }}
- name: Run tests with coverage
run: mix coveralls.github
if: ${{ contains(matrix.elixir, '1.17.2') && contains(matrix.otp, '27.0') }}
if: ${{ contains(matrix.elixir, '1.17.3') && contains(matrix.otp, '27.1') }}
- name: Static code analysis
run: mix dialyzer --format github --force-check
if: ${{ contains(matrix.elixir, '1.17.2') && contains(matrix.otp, '27.0') }}
if: ${{ contains(matrix.elixir, '1.17.3') && contains(matrix.otp, '27.1') }}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.8.0 - dev

+ Use `rewrite` version `~> 1.0`.
+ Add callback and default implementation `Recode.Task.update_source/3`
+ Add callback and default implementation `Recode.Task.new_issue/1` and
`Recode.Task.new_issue/2`
+ Rename `Recode.Task.TestFileExt` to `Recode.Task.TestFile`
+ Update `mix recode.update.config` to remove deprecated tasks

## 0.7.3 - 2024/07/25

+ Add config for preformatter.
Expand Down
34 changes: 28 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ A linter with autocorrection.
[`sourceror`](https://github.com/doorgan/sourceror) package by @doorgan.

This library is still under development, breaking changes are expected.
The same is true for `sourceror` and most of `recode`'s functionality is based
on `sourceror`.

`recode` can correct and check the following things:

Expand All @@ -37,7 +35,7 @@ Nesting # Checker - Checks code nesting depth in functions and mac
Warning tasks:
Dbg # Corrector - There should be no calls to dbg.
IOInspect # Corrector - There should be no calls to IO.inspect.
TestFileExt # Corrector - Checks the file extension of test files.
TestFile # Corrector - Checks the file extension of test files.
UnusedVariable # Corrector - Checks if unused variables occur.
```

Expand Down Expand Up @@ -116,7 +114,7 @@ This mix task generates the config file `.recode.exs`.
{Recode.Task.Specs, [exclude: "test/**/*.{ex,exs}", config: [only: :visible]]},
{Recode.Task.TagFIXME, [exit_code: 2]},
{Recode.Task.TagTODO, [exit_code: 4]},
{Recode.Task.TestFileExt, []},
{Recode.Task.TestFile, []},
{Recode.Task.UnnecessaryIfUnless, []},
{Recode.Task.UnusedVariable, [active: false]}
]
Expand Down Expand Up @@ -310,7 +308,7 @@ Changed by: Format
File: test/my_code_test.exs
Updates: 1
Changed by: TestFileExt
Changed by: TestFile
Moved from: test/my_code_test.ex
Executed 244 tasks in 0.01s.
Expand Down Expand Up @@ -360,7 +358,7 @@ Found 11 files, including 2 scripts.
[SinglePipe 10/25] Use a function call when a pipeline is only one function long.
File: test/my_code_test.ex
[TestFileExt -/-] The file must be renamed to test/my_code_test.exs so that ExUnit can find it.
[TestFile -/-] The file must be renamed to test/my_code_test.exs so that ExUnit can find it.
Finished in 0.05 seconds.
```
Expand Down Expand Up @@ -457,6 +455,30 @@ Calls to dbg/2 should only appear in debug sessions.
This task rewrites the code when mix recode runs with autocorrect: true.
```

## Code style and formatting

Code style and formatting are essential aspects of writing clean and
maintainable code. Different developers and teams may have varying preferences
when it comes to how code should be structured and formatted. Tools like
`recode` can help enforce consistency and improve readability by applying
predefined rules to the codebase. However, it's important to remember that
these rules are not set in stone and may not necessarily reflect the best
practices for every project.

Ultimately, the goal of code formatting is to make the code more
understandable and maintainable. It can help identify potential issues and
improve the overall quality of the code. While `recode` offers a set of rules to
follow, developers are free to choose which rules they want to apply based on
their own preferences and the requirements of the project.

It's worth noting that discussions around code style and formatting can be
subjective, and there is no one-size-fits-all solution. Developers should feel
empowered to make informed decisions about which formatting rules to apply and
adapt them as needed to suit their specific needs. There are numerous
resources available online that provide insights into code formatting best
practices, allowing developers to explore different approaches and find what
works best for them.


## Differences to Credo

Expand Down
4 changes: 1 addition & 3 deletions coveralls.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
"treat_no_relevant_lines_as_covered": true,
"minimum_coverage": 80
},
"skip_files": [
"lib/recode/task.ex"
]
"skip_files": ["test/support/strip.ex"]
}
9 changes: 5 additions & 4 deletions examples/my_code/.formatter.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
# plugins: [],
# plugins: [Recode.FormatterPlugin],
# plugins: [FreedomFormatter],
# plugins: [FreedomFormatter, Recode.FormatterPlugin],
# trailing_comma: true,
plugins: [FreedomFormatter, Recode.FormatterPlugin],
trailing_comma: true,
# recode: [
# tasks: [
# {Recode.Task.PipeFunOne, []},
# {Recode.Task.SinglePipe, []}
# ]
# ],
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"],
locals_without_parens: [noop: 1]
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}", "priv/**/*.json"],
locals_without_parens: [noop: 1],
subdirectories: ["priv/*/migrations"],
]
13 changes: 6 additions & 7 deletions examples/my_code/.recode.exs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[
version: "0.7.2",
version: "0.8.0",
# Can also be set/reset with `--autocorrect`/`--no-autocorrect`.
autocorrect: true,
# With "--dry" no changes will be written to the files.
Expand All @@ -11,29 +11,28 @@
# Can also be set/reset with `--verbose`/`--no-verbose`.
verbose: false,
# Can be overwritten by calling `mix recode "lib/**/*.ex"`.
inputs: ["{mix,.formatter}.exs", "{apps,config,lib,test}/**/*.{ex,exs}"],
inputs: ["{mix,.formatter}.exs", "{apps,config,lib,test,priv}/**/*.{ex,exs}"],
formatters: [Recode.CLIFormatter],
tasks: [
# Tasks could be added by a tuple of the tasks module name and an options
# keyword list. A task can be deactivated by `active: false`. The execution of
# a deactivated task can be forced by calling `mix recode --task ModuleName`.
# {Recode.Task.Format, []},
# {Recode.Task.Format, config: [formatter: :sourceror]},
# {Recode.Task.Format, config: [formatter: :elixir]},
# {Recode.Task.Format, active: false},
{Recode.Task.AliasExpansion, []},
{Recode.Task.AliasOrder, []},
{Recode.Task.Dbg, [autocorrect: false]},
{Recode.Task.EnforceLineLength, [active: false]},
{Recode.Task.FilterCount, []},
{Recode.Task.IOInspect, [autocorrect: false]},
{Recode.Task.LocalsWithoutParens, []},
{Recode.Task.Moduledoc, []},
{Recode.Task.Nesting, []},
{Recode.Task.PipeFunOne, []},
{Recode.Task.SinglePipe, []},
{Recode.Task.Specs, [exclude: ["test/**/*.{ex,exs}", "mix.exs"], config: [only: :visible]]},
{Recode.Task.TagFIXME, [exit_code: 2]},
{Recode.Task.TagTODO, [exit_code: 4]},
{Recode.Task.TestFileExt, []},
{Recode.Task.TestFile, []},
{Recode.Task.UnnecessaryIfUnless, []},
{Recode.Task.UnusedVariable, [active: false]}
]
]
2 changes: 2 additions & 0 deletions examples/my_code/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ defmodule MyCode.MixProject do
# dev/test
{:credo, "~> 1.6", only: [:dev, :test], runtime: false},
{:freedom_formatter, "~> 2.1", only: :dev},
{:json_formatter, "~> 0.2", only: :dev},
{:ecto_sql, "~> 3.12", only: :dev},
]
end
end
21 changes: 14 additions & 7 deletions examples/my_code/mix.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
%{
"bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"},
"credo": {:hex, :credo, "1.7.3", "05bb11eaf2f2b8db370ecaa6a6bda2ec49b2acd5e0418bc106b73b07128c0436", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "35ea675a094c934c22fb1dca3696f3c31f2728ae6ef5a53b5d648c11180a4535"},
"credo": {:hex, :credo, "1.7.8", "9722ba1681e973025908d542ec3d95db5f9c549251ba5b028e251ad8c24ab8c5", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "cb9e87cc64f152f3ed1c6e325e7b894dea8f5ef2e41123bd864e3cd5ceb44968"},
"db_connection": {:hex, :db_connection, "2.7.0", "b99faa9291bb09892c7da373bb82cba59aefa9b36300f6145c5f201c7adf48ec", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "dcf08f31b2701f857dfc787fbad78223d61a32204f217f15e881dd93e4bdd3ff"},
"decimal": {:hex, :decimal, "2.1.1", "5611dca5d4b2c3dd497dec8f68751f1f1a54755e8ed2a966c2633cf885973ad6", [:mix], [], "hexpm", "53cfe5f497ed0e7771ae1a475575603d77425099ba5faef9394932b35020ffcc"},
"ecto": {:hex, :ecto, "3.12.4", "267c94d9f2969e6acc4dd5e3e3af5b05cdae89a4d549925f3008b2b7eb0b93c3", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ef04e4101688a67d061e1b10d7bc1fbf00d1d13c17eef08b71d070ff9188f747"},
"ecto_sql": {:hex, :ecto_sql, "3.12.1", "c0d0d60e85d9ff4631f12bafa454bc392ce8b9ec83531a412c12a0d415a3a4d0", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.12", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.7", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.19 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "aff5b958a899762c5f09028c847569f7dfb9cc9d63bdb8133bff8a5546de6bf5"},
"escape": {:hex, :escape, "0.1.0", "548edab75e6e6938b1e199ef59cb8e504bcfd3bcf83471d4ae9a3c7a7a3c7d45", [:mix], [], "hexpm", "a5d8e92db4677155df54bc1306d401b5233875d570d474201db03cb3047491cd"},
"file_system": {:hex, :file_system, "1.0.0", "b689cc7dcee665f774de94b5a832e578bd7963c8e637ef940cd44327db7de2cd", [:mix], [], "hexpm", "6752092d66aec5a10e662aefeed8ddb9531d79db0bc145bb8c40325ca1d8536d"},
"freedom_formatter": {:hex, :freedom_formatter, "2.1.0", "0578dce24ee370cfcd84306166fbf121b65e51482e7be7e96f4062982f929bfa", [:mix], [], "hexpm", "6522fd7f78214c48cfe7ff6d269a56819ec004a09cd1c08809a3ab895504ee01"},
"glob_ex": {:hex, :glob_ex, "0.1.6", "3a311ade50f6b71d638af660edcc844c3ab4eb2a2c816cfebb73a1d521bb2f9d", [:mix], [], "hexpm", "fda1e90e10f6029bd72967fef0c9891d0d14da89ca7163076e6028bfcb2c42fa"},
"jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"},
"rewrite": {:hex, :rewrite, "0.10.0", "5d756b6dc67679e7156ff6055f9654be02dbaeb177aaf1ff6af7ee8da8718248", [:mix], [{:glob_ex, "~> 0.1", [hex: :glob_ex, repo: "hexpm", optional: false]}, {:sourceror, "~> 0.13", [hex: :sourceror, repo: "hexpm", optional: false]}], "hexpm", "68d7808cf549e7bf51b0119a8edc14d50970bad479115249030baa580c1d7b50"},
"sourceror": {:hex, :sourceror, "0.14.1", "c6fb848d55bd34362880da671debc56e77fd722fa13b4dcbeac89a8998fc8b09", [:mix], [], "hexpm", "8b488a219e4c4d7d9ff29d16346fd4a5858085ccdd010e509101e226bbfd8efc"},
"file_system": {:hex, :file_system, "1.0.1", "79e8ceaddb0416f8b8cd02a0127bdbababe7bf4a23d2a395b983c1f8b3f73edd", [:mix], [], "hexpm", "4414d1f38863ddf9120720cd976fce5bdde8e91d8283353f0e31850fa89feb9e"},
"freedom_formatter": {:hex, :freedom_formatter, "2.1.1", "5f33efc2c605ce01c0d1d854ec7cf091c6a6ec846f38de99b1d3fac7775a68bd", [:mix], [], "hexpm", "373b659b9763ca4f4d5fbccb4827b00dbd6c6898d528d5dce91eb60b29ac5fc1"},
"glob_ex": {:hex, :glob_ex, "0.1.11", "cb50d3f1ef53f6ca04d6252c7fde09fd7a1cf63387714fe96f340a1349e62c93", [:mix], [], "hexpm", "342729363056e3145e61766b416769984c329e4378f1d558b63e341020525de4"},
"jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"},
"json_formatter": {:hex, :json_formatter, "0.2.0", "e36ec571f2420c5afa4f744169eb5b2e7ed2ae0cadaf3cd39ef43e1d11fef29a", [:mix], [{:jason, "~> 1.3", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "c8b8c354420b88a3edd0f5a23d4ca8a6ca6090091df6965894631eb20fc7df31"},
"rewrite": {:hex, :rewrite, "1.0.0", "fddda21eb62c2b9dbd6cf35b39984d02761a63c25de2947ceab7ffe2729fa2e5", [:mix], [{:glob_ex, "~> 0.1", [hex: :glob_ex, repo: "hexpm", optional: false]}, {:sourceror, "~> 1.0", [hex: :sourceror, repo: "hexpm", optional: false]}, {:text_diff, "~> 0.1", [hex: :text_diff, repo: "hexpm", optional: false]}], "hexpm", "701975d9d0c21b1f40a82881e489aca6b53893f095f318978c6d2899299a514b"},
"sourceror": {:hex, :sourceror, "1.7.1", "599d78f4cc2be7d55c9c4fd0a8d772fd0478e3a50e726697c20d13d02aa056d4", [:mix], [], "hexpm", "cd6f268fe29fa00afbc535e215158680a0662b357dc784646d7dff28ac65a0fc"},
"telemetry": {:hex, :telemetry, "1.3.0", "fedebbae410d715cf8e7062c96a1ef32ec22e764197f70cda73d82778d61e7a2", [:rebar3], [], "hexpm", "7015fc8919dbe63764f4b4b87a95b7c0996bd539e0d499be6ec9d7f3875b79e6"},
"text_diff": {:hex, :text_diff, "0.1.0", "1caf3175e11a53a9a139bc9339bd607c47b9e376b073d4571c031913317fecaa", [:mix], [], "hexpm", "d1ffaaecab338e49357b6daa82e435f877e0649041ace7755583a0ea3362dbd7"},
}
5 changes: 5 additions & 0 deletions examples/my_code/priv/repo/migrations/.formatter.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[
import_deps: [:ecto_sql],
plugins: [Recode.FormatterPlugin],
inputs: ["*.exs"]
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
defmodule MyRepo.Migrations.CreateUsers do
use Ecto.Migration

def up do
create table("users") do
add :first_name, :string, size: 40
add(:last_name, :string, size: 40)

timestamps()
end
end

def down do
drop table("users")
end
end
1 change: 1 addition & 0 deletions examples/my_code/priv/some.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"a": 1, "b": "foo", "c": {"d": 2, "e": "bar"}}
Binary file modified examples/my_code/scripts/backup.bin
Binary file not shown.
6 changes: 3 additions & 3 deletions examples/my_code/scripts/backup.exs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
defmodule Backup do
@inputs "{config,lib,test}/**/*"
@inputs "{priv,config,lib,test}/**/*"
@backup "scripts/backup.bin"

def run([]) do
@inputs
|> Path.wildcard()
|> Path.wildcard(match_dot: true)
|> Enum.reject(&File.dir?/1)
|> Enum.into(%{}, fn path -> {path, File.read!(path)} end)
|> backup()
Expand All @@ -13,7 +13,7 @@ defmodule Backup do
def run(["restore"]) do
IO.puts("restoring form backup #{@backup}")

Enum.each(["lib", "test", "config"], fn dir -> File.rm_rf!(dir) end)
Enum.each(["lib", "test", "config", "priv"], fn dir -> File.rm_rf!(dir) end)

files = @backup |> File.read!() |> :erlang.binary_to_term()

Expand Down
8 changes: 7 additions & 1 deletion lib/mix/tasks/recode.help.ex
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,16 @@ defmodule Mix.Tasks.Recode.Help do
print("Readability tasks:", info.readability, max)
print("Refactor tasks:", info.refactor, max)
print("Warning tasks:", info.warning, max)

Escape.puts([
"\n",
"To get help for a specific task run ",
[:cyan, "mix recode.help [task-name]."]
])
end

defp print(section, tasks, max) do
IO.puts(section)
Escape.puts([:yellow, :reverse, " #{section} "])

Enum.each(tasks, fn {task, doc, corrector?} ->
type = if corrector?, do: "Corrector -", else: "Checker -"
Expand Down
2 changes: 2 additions & 0 deletions lib/mix/tasks/recode.update.config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ defmodule Mix.Tasks.Recode.Update.Config do

@config_filename ".recode.exs"
@deprecated_configs [:formatter]
@removed_tasks [Recode.Task.TestFileExt]

@doc false
def run([]), do: do_run(false)
Expand All @@ -31,6 +32,7 @@ defmodule Mix.Tasks.Recode.Update.Config do
|> elem(0)
|> delete(@deprecated_configs)
|> Recode.Config.merge()
|> Recode.Config.delete_tasks(@removed_tasks)

Mix.Generator.create_file(@config_filename, Recode.Config.to_string(config), force: force)
else
Expand Down
3 changes: 2 additions & 1 deletion lib/recode.ex
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
defmodule Recode do
@moduledoc """
A linter with autocorrection and a refactoring tool.
A formatter and linter with autocorrection.
See [Recode](readme.html) under pages for more information.
"""
end
Loading

0 comments on commit f961939

Please sign in to comment.