Skip to content

Commit

Permalink
Add Dialyzer to Project Deps, Resolve Initial Issues (#30)
Browse files Browse the repository at this point in the history
* Add Dialyzer to Project Deps, Resolve Initial Issues

* run dialyzer in CI

* Corrent link to this project fork

* adding dialyzer to test env for CII
  • Loading branch information
bradschwartz authored Jan 25, 2024
1 parent 82dc7cd commit 8518242
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ jobs:
- run: mix credo --strict --format=oneline

- run: mix test --warnings-as-errors --cover

- name: Run dialyzer
run: mix dialyzer --format github
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Documentation is [available on Hexdocs](https://hexdocs.pm/grapqhl_markdown/)

## Contributing

1. [Fork it!](http://github.com/rrrene/credo/fork)
1. [Fork it!](http://github.com/podium/graphql_markdown/fork)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
Expand Down
4 changes: 1 addition & 3 deletions lib/graphql_markdown/single_page.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule GraphqlMarkdown.SinglePage do
alias GraphqlMarkdown.Renderer
alias GraphqlMarkdown.Schema

@spec render_schema(GraphqlMarkdown.Schema.t(), keyword) :: :ok
@spec render_schema(GraphqlMarkdown.Schema.t(), keyword) :: :ok | {:error, :renderer_error}
def render_schema(schema_details, options) do
dir = Keyword.get(options, :output_dir, ".")
filename = Path.join(dir, "graphql_schema.md")
Expand Down Expand Up @@ -48,8 +48,6 @@ defmodule GraphqlMarkdown.SinglePage do
print_toc_type("unions", schema_details.unions)
end

defp print_toc_type(nil, _), do: ""

defp print_toc_type(_, nil), do: ""

defp print_toc_type(type_label, %{"fields" => fields} = _types)
Expand Down
4 changes: 3 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ defmodule GraphqlMarkdown.MixProject do
deps: deps(),
docs: docs(),
package: package(),
test_coverage: [summary: [threshold: 85]]
test_coverage: [summary: [threshold: 85]],
dialyzer: [plt_add_apps: [:mix]]
]
end

Expand All @@ -30,6 +31,7 @@ defmodule GraphqlMarkdown.MixProject do
defp deps do
[
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.30", only: [:dev, :test], runtime: false},
{:jason, "~> 1.4"}
]
Expand Down
2 changes: 2 additions & 0 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
%{
"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"},
"dialyxir": {:hex, :dialyxir, "1.4.3", "edd0124f358f0b9e95bfe53a9fcf806d615d8f838e2202a9f430d59566b6b53b", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "bf2cfb75cd5c5006bec30141b131663299c661a864ec7fbbc72dfa557487a986"},
"earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"},
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
"ex_doc": {:hex, :ex_doc, "0.31.1", "8a2355ac42b1cc7b2379da9e40243f2670143721dd50748bf6c3b1184dae2089", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "3178c3a407c557d8343479e1ff117a96fd31bafe52a039079593fb0524ef61b0"},
"file_system": {:hex, :file_system, "1.0.0", "b689cc7dcee665f774de94b5a832e578bd7963c8e637ef940cd44327db7de2cd", [:mix], [], "hexpm", "6752092d66aec5a10e662aefeed8ddb9531d79db0bc145bb8c40325ca1d8536d"},
"jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"},
Expand Down

0 comments on commit 8518242

Please sign in to comment.