diff --git a/.credo.exs b/.credo.exs index 8955420..acdc1ac 100644 --- a/.credo.exs +++ b/.credo.exs @@ -4,6 +4,9 @@ # If you find anything wrong or unclear in this file, please report an # issue on GitHub: https://github.com/rrrene/credo/issues # + +exclude_test_files = {:files, %{excluded: ["test/", "apps/*/test/"]}} + %{ # # You can have as many configs as you like in the `configs:` field. @@ -46,7 +49,7 @@ # If you want to enforce a style guide and need a more traditional linting # experience, you can change `strict` to `true` below: # - strict: false, + strict: true, # # To modify the timeout for parsing files, change this value: # @@ -64,122 +67,140 @@ # # {Credo.Check.Design.DuplicatedCode, false} # - checks: [ - # - ## Consistency Checks - # - {Credo.Check.Consistency.ExceptionNames, []}, - {Credo.Check.Consistency.LineEndings, []}, - {Credo.Check.Consistency.ParameterPatternMatching, []}, - {Credo.Check.Consistency.SpaceAroundOperators, []}, - {Credo.Check.Consistency.SpaceInParentheses, []}, - {Credo.Check.Consistency.TabsOrSpaces, []}, + checks: %{ + enabled: [ + # + ## Consistency Checks + # + {Credo.Check.Consistency.ExceptionNames, []}, + {Credo.Check.Consistency.LineEndings, []}, + {Credo.Check.Consistency.ParameterPatternMatching, []}, + {Credo.Check.Consistency.SpaceAroundOperators, []}, + {Credo.Check.Consistency.SpaceInParentheses, []}, + {Credo.Check.Consistency.TabsOrSpaces, []}, + {Credo.Check.Consistency.MultiAliasImportRequireUse, []}, + {Credo.Check.Consistency.UnusedVariableNames, []}, - # - ## Design Checks - # - # You can customize the priority of any check - # Priority values are: `low, normal, high, higher` - # - {Credo.Check.Design.AliasUsage, - [priority: :low, if_nested_deeper_than: 2, if_called_more_often_than: 0]}, - # You can also customize the exit_status of each check. - # If you don't want TODO comments to cause `mix credo` to fail, just - # set this value to 0 (zero). - # - {Credo.Check.Design.TagTODO, [exit_status: 0]}, - {Credo.Check.Design.TagFIXME, [exit_status: 0]}, + # + ## Design Checks + # + # You can customize the priority of any check + # Priority values are: `low, normal, high, higher` + # + {Credo.Check.Design.AliasUsage, + [priority: :low, if_nested_deeper_than: 3, if_called_more_often_than: 1]}, + {Credo.Check.Design.TagTODO, [exit_status: 0]}, + {Credo.Check.Design.TagFIXME, [exit_status: 0]}, + {Credo.Check.Design.DuplicatedCode, [exclude_test_files]}, + {Credo.Check.Design.SkipTestWithoutComment, []}, - # - ## Readability Checks - # - {Credo.Check.Readability.AliasOrder, []}, - {Credo.Check.Readability.FunctionNames, []}, - {Credo.Check.Readability.LargeNumbers, []}, - {Credo.Check.Readability.MaxLineLength, [priority: :low, max_length: 120]}, - {Credo.Check.Readability.ModuleAttributeNames, []}, - {Credo.Check.Readability.ModuleDoc, []}, - {Credo.Check.Readability.ModuleNames, []}, - {Credo.Check.Readability.ParenthesesInCondition, []}, - {Credo.Check.Readability.ParenthesesOnZeroArityDefs, []}, - {Credo.Check.Readability.PredicateFunctionNames, []}, - {Credo.Check.Readability.PreferImplicitTry, []}, - {Credo.Check.Readability.RedundantBlankLines, []}, - {Credo.Check.Readability.Semicolons, []}, - {Credo.Check.Readability.SpaceAfterCommas, []}, - {Credo.Check.Readability.StringSigils, []}, - {Credo.Check.Readability.TrailingBlankLine, []}, - {Credo.Check.Readability.TrailingWhiteSpace, []}, - {Credo.Check.Readability.UnnecessaryAliasExpansion, []}, - {Credo.Check.Readability.VariableNames, []}, + # + ## Readability Checks + # + {Credo.Check.Readability.AliasOrder, []}, + {Credo.Check.Readability.FunctionNames, []}, + {Credo.Check.Readability.LargeNumbers, []}, + {Credo.Check.Readability.MaxLineLength, [priority: :low, max_length: 120]}, + {Credo.Check.Readability.ModuleAttributeNames, []}, + {Credo.Check.Readability.ModuleDoc, [exclude_test_files]}, + {Credo.Check.Readability.ModuleNames, []}, + {Credo.Check.Readability.ParenthesesInCondition, []}, + {Credo.Check.Readability.ParenthesesOnZeroArityDefs, []}, + {Credo.Check.Readability.PipeIntoAnonymousFunctions, []}, + {Credo.Check.Readability.PredicateFunctionNames, []}, + {Credo.Check.Readability.PreferImplicitTry, []}, + {Credo.Check.Readability.RedundantBlankLines, []}, + {Credo.Check.Readability.Semicolons, []}, + {Credo.Check.Readability.SpaceAfterCommas, []}, + {Credo.Check.Readability.StringSigils, []}, + {Credo.Check.Readability.TrailingBlankLine, []}, + {Credo.Check.Readability.TrailingWhiteSpace, []}, + {Credo.Check.Readability.UnnecessaryAliasExpansion, []}, + {Credo.Check.Readability.VariableNames, []}, + {Credo.Check.Readability.WithSingleClause, []}, + {Credo.Check.Readability.ImplTrue, []}, + {Credo.Check.Readability.MultiAlias, []}, + {Credo.Check.Readability.NestedFunctionCalls, [min_pipeline_length: 3]}, + {Credo.Check.Readability.SinglePipe, []}, + {Credo.Check.Readability.Specs, []}, + {Credo.Check.Readability.WithCustomTaggedTuple, []}, - # - ## Refactoring Opportunities - # - {Credo.Check.Refactor.CondStatements, []}, - {Credo.Check.Refactor.CyclomaticComplexity, []}, - {Credo.Check.Refactor.FunctionArity, []}, - {Credo.Check.Refactor.LongQuoteBlocks, []}, - {Credo.Check.Refactor.MapInto, []}, - {Credo.Check.Refactor.MatchInCondition, []}, - {Credo.Check.Refactor.NegatedConditionsInUnless, []}, - {Credo.Check.Refactor.NegatedConditionsWithElse, []}, - {Credo.Check.Refactor.Nesting, []}, - {Credo.Check.Refactor.UnlessWithElse, []}, - {Credo.Check.Refactor.WithClauses, []}, + # + ## Refactoring Opportunities + # + {Credo.Check.Refactor.Apply, []}, + {Credo.Check.Refactor.CondStatements, []}, + {Credo.Check.Refactor.CyclomaticComplexity, []}, + {Credo.Check.Refactor.FunctionArity, []}, + {Credo.Check.Refactor.LongQuoteBlocks, []}, + {Credo.Check.Refactor.MatchInCondition, []}, + {Credo.Check.Refactor.MapJoin, []}, + {Credo.Check.Refactor.NegatedConditionsInUnless, []}, + {Credo.Check.Refactor.NegatedConditionsWithElse, []}, + {Credo.Check.Refactor.Nesting, []}, + {Credo.Check.Refactor.UnlessWithElse, []}, + {Credo.Check.Refactor.WithClauses, []}, + {Credo.Check.Refactor.FilterFilter, []}, + {Credo.Check.Refactor.RejectReject, []}, + {Credo.Check.Refactor.RedundantWithClauseResult, []}, + {Credo.Check.Refactor.AppendSingleItem, []}, + {Credo.Check.Refactor.DoubleBooleanNegation, []}, + {Credo.Check.Refactor.FilterReject, []}, + {Credo.Check.Refactor.IoPuts, []}, + {Credo.Check.Refactor.MapMap, []}, + {Credo.Check.Refactor.NegatedIsNil, []}, + {Credo.Check.Refactor.PipeChainStart, []}, + {Credo.Check.Refactor.RejectFilter, []}, - # - ## Warnings - # - {Credo.Check.Warning.BoolOperationOnSameValues, []}, - {Credo.Check.Warning.ExpensiveEmptyEnumCheck, []}, - {Credo.Check.Warning.IExPry, []}, - {Credo.Check.Warning.IoInspect, []}, - {Credo.Check.Warning.LazyLogging, []}, - {Credo.Check.Warning.MixEnv, false}, - {Credo.Check.Warning.OperationOnSameValues, []}, - {Credo.Check.Warning.OperationWithConstantResult, []}, - {Credo.Check.Warning.RaiseInsideRescue, []}, - {Credo.Check.Warning.UnusedEnumOperation, []}, - {Credo.Check.Warning.UnusedFileOperation, []}, - {Credo.Check.Warning.UnusedKeywordOperation, []}, - {Credo.Check.Warning.UnusedListOperation, []}, - {Credo.Check.Warning.UnusedPathOperation, []}, - {Credo.Check.Warning.UnusedRegexOperation, []}, - {Credo.Check.Warning.UnusedStringOperation, []}, - {Credo.Check.Warning.UnusedTupleOperation, []}, - {Credo.Check.Warning.UnsafeExec, []}, + # + ## Warnings + # + {Credo.Check.Warning.ApplicationConfigInModuleAttribute, []}, + {Credo.Check.Warning.BoolOperationOnSameValues, []}, + {Credo.Check.Warning.ExpensiveEmptyEnumCheck, []}, + {Credo.Check.Warning.IExPry, []}, + {Credo.Check.Warning.IoInspect, []}, + {Credo.Check.Warning.OperationOnSameValues, []}, + {Credo.Check.Warning.OperationWithConstantResult, []}, + {Credo.Check.Warning.RaiseInsideRescue, []}, + {Credo.Check.Warning.SpecWithStruct, []}, + {Credo.Check.Warning.WrongTestFileExtension, []}, + {Credo.Check.Warning.UnusedEnumOperation, []}, + {Credo.Check.Warning.UnusedFileOperation, []}, + {Credo.Check.Warning.UnusedKeywordOperation, []}, + {Credo.Check.Warning.UnusedListOperation, []}, + {Credo.Check.Warning.UnusedPathOperation, []}, + {Credo.Check.Warning.UnusedRegexOperation, []}, + {Credo.Check.Warning.UnusedStringOperation, []}, + {Credo.Check.Warning.UnusedTupleOperation, []}, + {Credo.Check.Warning.UnsafeExec, []}, + {Credo.Check.Warning.MapGetUnsafePass, []}, + {Credo.Check.Warning.MixEnv, []}, + {Credo.Check.Warning.UnsafeToAtom, []}, - # - # Checks scheduled for next check update (opt-in for now, just replace `false` with `[]`) + # + ## Team checks + # + {JetCredo.Checks.ExplicitAnyType, []} + ], + disabled: [ + {Credo.Check.Readability.AliasAs, []}, + {Credo.Check.Readability.BlockPipe, []}, + {Credo.Check.Readability.SeparateAliasRequire, []}, + {Credo.Check.Readability.SingleFunctionToBlockPipe, []}, + {Credo.Check.Readability.StrictModuleLayout, []}, + {Credo.Check.Refactor.ABCSize, []}, + {Credo.Check.Refactor.ModuleDependencies, []}, + {Credo.Check.Refactor.VariableRebinding, []}, + {Credo.Check.Warning.LeakyEnvironment, []} - # - # Controversial and experimental checks (opt-in, just replace `false` with `[]`) - # - {Credo.Check.Readability.StrictModuleLayout, false}, - {Credo.Check.Consistency.MultiAliasImportRequireUse, false}, - {Credo.Check.Consistency.UnusedVariableNames, false}, - {Credo.Check.Design.DuplicatedCode, false}, - {Credo.Check.Readability.AliasAs, false}, - {Credo.Check.Readability.MultiAlias, false}, - {Credo.Check.Readability.Specs, false}, - {Credo.Check.Readability.SinglePipe, false}, - {Credo.Check.Readability.WithCustomTaggedTuple, false}, - {Credo.Check.Refactor.ABCSize, false}, - {Credo.Check.Refactor.AppendSingleItem, false}, - {Credo.Check.Refactor.DoubleBooleanNegation, false}, - {Credo.Check.Refactor.ModuleDependencies, false}, - {Credo.Check.Refactor.NegatedIsNil, false}, - {Credo.Check.Refactor.PipeChainStart, false}, - {Credo.Check.Refactor.VariableRebinding, false}, - {Credo.Check.Warning.MapGetUnsafePass, false}, - {Credo.Check.Warning.UnsafeToAtom, false}, - {Credo.Check.Warning.LeakyEnvironment, false} + # {Credo.Check.Refactor.MapInto, []}, - # - # Custom checks can be created using `mix credo.gen.check`. - # - ] + # + # Custom checks can be created using `mix credo.gen.check`. + # + ] + } } ] } diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml new file mode 100644 index 0000000..6fd4ad8 --- /dev/null +++ b/.github/workflows/elixir.yml @@ -0,0 +1,92 @@ +name: Elixir CI + +on: + push: + branches: + - main + pull_request: + branches: + - main +env: + OTP_VERSION: 25.0 + ELIXIR_VERSION: 1.14.5-otp-25 + +concurrency: + group: ${{ github.workflow }}-${{ github.ref_name }} + cancel-in-progress: true + +jobs: + mix: + runs-on: ubuntu-latest + steps: + - name: Setup + uses: byzanteam/jet-actions/setup-elixir@main + with: + otp-version: ${{ env.OTP_VERSION }} + elixir-version: ${{ env.ELIXIR_VERSION }} + + - name: Install Dependencies + run: mix do deps.get, deps.unlock --check-unused, deps.clean --unused + + build: + runs-on: ubuntu-latest + needs: mix + steps: + - name: Setup + uses: byzanteam/jet-actions/setup-elixir@main + with: + otp-version: ${{ env.OTP_VERSION }} + elixir-version: ${{ env.ELIXIR_VERSION }} + + - name: Check formatting + run: mix format --check-formatted + - name: Check warnings + run: mix compile --warnings-as-errors + + test: + runs-on: ubuntu-latest + needs: mix + + steps: + - name: Setup + uses: byzanteam/jet-actions/setup-elixir@main + with: + otp-version: ${{ env.OTP_VERSION }} + elixir-version: ${{ env.ELIXIR_VERSION }} + + + - name: Test + run: mix test + + credo: + runs-on: ubuntu-latest + needs: mix + steps: + - name: Setup + uses: byzanteam/jet-actions/setup-elixir@main + with: + otp-version: ${{ env.OTP_VERSION }} + elixir-version: ${{ env.ELIXIR_VERSION }} + + - name: Credo + run: mix credo --strict + + dialyzer: + runs-on: ubuntu-latest + needs: mix + steps: + - name: Setup + uses: byzanteam/jet-actions/setup-elixir@main + with: + otp-version: ${{ env.OTP_VERSION }} + elixir-version: ${{ env.ELIXIR_VERSION }} + + - uses: actions/cache@v3 + with: + path: priv/plts + key: ${{ runner.os }}-plt-${{ hashFiles('.tool-versions') }}-${{ hashFiles('**/mix.lock') }} + restore-keys: | + ${{ runner.os }}-plt-${{ hashFiles('.tool-versions') }}- + + - name: Dialyzer + run: mix dialyzer --format github diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 735e04c..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,209 +0,0 @@ -name: CI - -on: - push: - branches: - - master - pull_request: - branches: - - master - -env: - ELIXIR_VERSION: 1.10.2 - OTP_VERSION: 22.2 - -jobs: - mix: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Setup elixir - uses: erlef/setup-elixir@v1 - with: - elixir-version: ${{ env.ELIXIR_VERSION }} - otp-version: ${{ env.OTP_VERSION }} - - - uses: actions/cache@v1.1.2 - with: - path: deps - key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - restore-keys: | - ${{ runner.os }}-mix- - - - name: Install Dependencies - run: mix do deps.get, deps.clean --unused - - build: - runs-on: ubuntu-latest - needs: mix - - steps: - - uses: actions/checkout@v2 - - name: Setup elixir - uses: erlef/setup-elixir@v1 - with: - elixir-version: ${{ env.ELIXIR_VERSION }} - otp-version: ${{ env.OTP_VERSION }} - - - uses: actions/cache@v1.1.2 - with: - path: deps - key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - restore-keys: | - ${{ runner.os }}-mix- - - - uses: actions/cache@v1.1.2 - with: - path: _build - key: ${{ runner.os }}-build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - restore-keys: | - ${{ runner.os }}-build- - - - name: Compile - run: mix deps.compile --warnings-as-errors - - test: - runs-on: ubuntu-latest - needs: build - - steps: - - uses: actions/checkout@v2 - - name: Setup elixir - uses: erlef/setup-elixir@v1 - with: - elixir-version: ${{ env.ELIXIR_VERSION }} - otp-version: ${{ env.OTP_VERSION }} - - - uses: actions/cache@v1.1.2 - with: - path: deps - key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - restore-keys: | - ${{ runner.os }}-mix- - - - uses: actions/cache@v1.1.2 - with: - path: _build - key: ${{ runner.os }}-build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - restore-keys: | - ${{ runner.os }}-build- - - - name: Test - run: mix test - - format: - runs-on: ubuntu-latest - needs: build - - steps: - - uses: actions/checkout@v2 - - name: Setup elixir - uses: erlef/setup-elixir@v1 - with: - elixir-version: ${{ env.ELIXIR_VERSION }} - otp-version: ${{ env.OTP_VERSION }} - - - uses: actions/cache@v1.1.2 - with: - path: deps - key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - restore-keys: | - ${{ runner.os }}-mix- - - - name: Format - run: mix format --check-formatted - - doctor: - runs-on: ubuntu-latest - needs: build - - steps: - - uses: actions/checkout@v2 - - name: Setup elixir - uses: erlef/setup-elixir@v1 - with: - elixir-version: ${{ env.ELIXIR_VERSION }} - otp-version: ${{ env.OTP_VERSION }} - - - uses: actions/cache@v1.1.2 - with: - path: deps - key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - restore-keys: | - ${{ runner.os }}-mix- - - - uses: actions/cache@v1.1.2 - with: - path: _build - key: ${{ runner.os }}-build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - restore-keys: | - ${{ runner.os }}-build- - - - name: Doctor - run: mix doctor --summary - - dialyzer: - runs-on: ubuntu-latest - needs: build - - steps: - - uses: actions/checkout@v2 - - name: Setup elixir - uses: erlef/setup-elixir@v1 - with: - elixir-version: ${{ env.ELIXIR_VERSION }} - otp-version: ${{ env.OTP_VERSION }} - - - uses: actions/cache@v1.1.2 - with: - path: deps - key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - restore-keys: | - ${{ runner.os }}-mix- - - - uses: actions/cache@v1.1.2 - with: - path: _build - key: ${{ runner.os }}-build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - restore-keys: | - ${{ runner.os }}-build- - - - uses: actions/cache@v1.1.2 - with: - path: priv/plts - key: ${{ runner.os }}-plt-$OTP_VERSION-$ELIXIR_VERSION - restore-keys: | - ${{ runner.os }}-plt- - - - name: Dialyzer - run: mix dialyzer - - credo: - runs-on: ubuntu-latest - needs: build - - steps: - - uses: actions/checkout@v2 - - name: Setup elixir - uses: erlef/setup-elixir@v1 - with: - elixir-version: ${{ env.ELIXIR_VERSION }} - otp-version: ${{ env.OTP_VERSION }} - - - uses: actions/cache@v1.1.2 - with: - path: deps - key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - restore-keys: | - ${{ runner.os }}-mix- - - - uses: actions/cache@v1.1.2 - with: - path: _build - key: ${{ runner.os }}-build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - restore-keys: | - ${{ runner.os }}-build- - - - name: Credo - run: mix credo --strict diff --git a/.tool-versions b/.tool-versions index e71c9bb..28d0897 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -elixir 1.11.1-otp-23 -erlang 23.3 +elixir 1.14.5-otp-25 +erlang 25.0 diff --git a/lib/workflow_metal/case/case.ex b/lib/workflow_metal/case/case.ex index 86a376d..44733cd 100644 --- a/lib/workflow_metal/case/case.ex +++ b/lib/workflow_metal/case/case.ex @@ -319,9 +319,7 @@ defmodule WorkflowMetal.Case.Case do case do_lock_tokens(MapSet.new(token_ids), task_id, data) do {:ok, locked_token_schemas, data} -> Logger.debug(fn -> - "#{describe(data)}: tokens(#{token_ids |> Enum.join(", ")}) have been locked by the task(#{ - task_id - })" + "#{describe(data)}: tokens(#{token_ids |> Enum.join(", ")}) have been locked by the task(#{task_id})" end) { @@ -349,9 +347,7 @@ defmodule WorkflowMetal.Case.Case do {:ok, tokens, data} = do_consume_tokens(task_id, data) Logger.debug(fn -> - "#{describe(data)}: tokens(#{tokens |> Enum.map_join(", ", & &1.id)}) have been consumed by the task(#{ - task_id - })" + "#{describe(data)}: tokens(#{tokens |> Enum.map_join(", ", & &1.id)}) have been consumed by the task(#{task_id})" end) { @@ -423,9 +419,7 @@ defmodule WorkflowMetal.Case.Case do {:ok, tokens} = WorkflowMetal.Storage.unlock_tokens(data.application, token_ids) Logger.debug(fn -> - "#{describe(data)}: tokens(#{tokens |> Enum.map(& &1.id) |> Enum.join(", ")}) have been freed by the task(#{ - task_id - })" + "#{describe(data)}: tokens(#{tokens |> Enum.map(& &1.id) |> Enum.join(", ")}) have been freed by the task(#{task_id})" end) { @@ -771,9 +765,7 @@ defmodule WorkflowMetal.Case.Case do {:ok, [%Schema.Task{id: task_id}]} when task_id !== except_task_id -> Logger.info(fn -> """ - #{describe(data)} withdraw token(#{inspect(token_schema.id)}) from task #{ - inspect(task_id) - }. + #{describe(data)} withdraw token(#{inspect(token_schema.id)}) from task #{inspect(task_id)}. """ end) diff --git a/lib/workflow_metal/registration.ex b/lib/workflow_metal/registration.ex index 3805389..d7aa77a 100644 --- a/lib/workflow_metal/registration.ex +++ b/lib/workflow_metal/registration.ex @@ -31,9 +31,7 @@ defmodule WorkflowMetal.Registration do config -> raise ArgumentError, - "invalid :registry option for WorkflowMetal application `#{inspect(application)}`: `#{ - inspect(config) - }`" + "invalid :registry option for WorkflowMetal application `#{inspect(application)}`: `#{inspect(config)}`" end end diff --git a/lib/workflow_metal/workitem/workitem.ex b/lib/workflow_metal/workitem/workitem.ex index 2646e6c..1465663 100644 --- a/lib/workflow_metal/workitem/workitem.ex +++ b/lib/workflow_metal/workitem/workitem.ex @@ -372,8 +372,6 @@ defmodule WorkflowMetal.Workitem.Workitem do } } = data - "[#{inspect(__MODULE__)}] Workitem<#{workitem_id}@#{task_id}.#{case_id}##{transition_id}.#{ - workflow_id - }>" + "[#{inspect(__MODULE__)}] Workitem<#{workitem_id}@#{task_id}.#{case_id}##{transition_id}.#{workflow_id}>" end end diff --git a/mix.exs b/mix.exs index c54732f..6169e86 100644 --- a/mix.exs +++ b/mix.exs @@ -5,7 +5,7 @@ defmodule WorkflowMetal.MixProject do [ app: :workflow_metal, version: "0.3.0", - elixir: "~> 1.10", + elixir: "~> 1.14", start_permanent: Mix.env() == :prod, description: description(), package: package(), @@ -40,11 +40,12 @@ defmodule WorkflowMetal.MixProject do defp deps do [ {:ex_doc, ">= 0.0.0", only: :dev, runtime: false}, - {:credo, "~> 1.2", only: [:dev, :test], runtime: false}, - {:dialyxir, "~> 1.1.0", only: [:dev], runtime: false}, {:doctor, "~> 0.17.0", only: [:dev]}, {:gen_state_machine, "~> 3.0"}, - {:typed_struct, "~> 0.3.0"} + {:typed_struct, "~> 0.3.0"}, + {:credo, "~> 1.6", only: [:dev, :test], runtime: false}, + {:jet_credo, [github: "Byzanteam/jet_credo", only: [:dev, :test], runtime: false]}, + {:dialyxir, "~> 1.0", only: [:dev], runtime: false} ] end diff --git a/mix.lock b/mix.lock index 43e2bb8..8db82bb 100644 --- a/mix.lock +++ b/mix.lock @@ -1,15 +1,16 @@ %{ - "bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"}, - "credo": {:hex, :credo, "1.5.5", "e8f422026f553bc3bebb81c8e8bf1932f498ca03339856c7fec63d3faac8424b", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "dd8623ab7091956a855dc9f3062486add9c52d310dfd62748779c4315d8247de"}, + "bunt": {:hex, :bunt, "0.2.1", "e2d4792f7bc0ced7583ab54922808919518d0e57ee162901a16a1b6664ef3b14", [:mix], [], "hexpm", "a330bfb4245239787b15005e66ae6845c9cd524a288f0d141c148b02603777a5"}, + "credo": {:hex, :credo, "1.7.0", "6119bee47272e85995598ee04f2ebbed3e947678dee048d10b5feca139435f75", [:mix], [{:bunt, "~> 0.2.1", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "6839fcf63d1f0d1c0f450abc8564a57c43d644077ab96f2934563e68b8a769d7"}, "decimal": {:hex, :decimal, "2.0.0", "a78296e617b0f5dd4c6caf57c714431347912ffb1d0842e998e9792b5642d697", [:mix], [], "hexpm", "34666e9c55dea81013e77d9d87370fe6cb6291d1ef32f46a1600230b1d44f577"}, - "dialyxir": {:hex, :dialyxir, "1.1.0", "c5aab0d6e71e5522e77beff7ba9e08f8e02bad90dfbeffae60eaf0cb47e29488", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "07ea8e49c45f15264ebe6d5b93799d4dd56a44036cf42d0ad9c960bc266c0b9a"}, + "dialyxir": {:hex, :dialyxir, "1.3.0", "fd1672f0922b7648ff9ce7b1b26fcf0ef56dda964a459892ad15f6b4410b5284", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "00b2a4bcd6aa8db9dcb0b38c1225b7277dca9bc370b6438715667071a304696f"}, "doctor": {:hex, :doctor, "0.17.0", "dcd1fced28a731597eccb96b02c79cfaed948faacbfe00088cad08fd78ff7baf", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "6577faca80139b55c1e5feff4bc282e757444ca0e6cff002127759025ebd836d"}, "earmark_parser": {:hex, :earmark_parser, "1.4.20", "89970db71b11b6b89759ce16807e857df154f8df3e807b2920a8c39834a9e5cf", [:mix], [], "hexpm", "1eb0d2dabeeeff200e0d17dc3048a6045aab271f73ebb82e416464832eb57bdd"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, "ex_doc": {:hex, :ex_doc, "0.28.1", "34fab7e7201c5a1f275f3b2f837125c940c512e8543d181bd4dd7acb19c8dba0", [:mix], [{:earmark_parser, "~> 1.4.19", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "10e564dd59101a5edc4de7009a54baed015a246dee01f7200aab24e8f57fc044"}, "file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"}, "gen_state_machine": {:hex, :gen_state_machine, "3.0.0", "1e57f86a494e5c6b14137ebef26a7eb342b3b0070c7135f2d6768ed3f6b6cdff", [:mix], [], "hexpm", "0a59652574bebceb7309f6b749d2a41b45fdeda8dbb4da0791e355dd19f0ed15"}, - "jason": {:hex, :jason, "1.2.2", "ba43e3f2709fd1aa1dce90aaabfd039d000469c05c56f0b8e31978e03fa39052", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "18a228f5f0058ee183f29f9eae0805c6e59d61c3b006760668d8d18ff0d12179"}, + "jason": {:hex, :jason, "1.4.0", "e855647bc964a44e2f67df589ccf49105ae039d4179db7f6271dfd3843dc27e6", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "79a3791085b2a0f743ca04cec0f7be26443738779d09302e01318f97bdb82121"}, + "jet_credo": {:git, "https://github.com/Byzanteam/jet_credo.git", "7e5855de2e8b41abfb0a1f5870bbc768a325f4e8", []}, "makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"}, "makeup_elixir": {:hex, :makeup_elixir, "0.15.2", "dc72dfe17eb240552857465cc00cce390960d9a0c055c4ccd38b70629227e97c", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.1", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "fd23ae48d09b32eff49d4ced2b43c9f086d402ee4fd4fcb2d7fad97fa8823e75"}, "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"},