Skip to content

Commit

Permalink
Credo fixes to comply with --strict option (#177)
Browse files Browse the repository at this point in the history
* Credo fixes to comply with --strict option

* Add --strict option to mix credo on Travis
  • Loading branch information
kbaird authored and doomspork committed Feb 10, 2019
1 parent 1f8651f commit 887699e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -39,6 +39,6 @@ cache:

script:
- mix test
- mix credo
- mix credo --strict
- if [[ `elixir -v` = *"1.8"* ]]; then mix dialyzer --halt-exit-status; fi
- if ! [[ `elixir -v` = *"1.5"* ]]; then mix format --check-formatted; fi
6 changes: 2 additions & 4 deletions lib/jsonapi.ex
Expand Up @@ -9,7 +9,7 @@ defmodule JSONAPI do
in your `config/config.exs`:
config :jsonapi, :json_library, Jason
"""
def json_library() do
def json_library do
module = Application.get_env(:jsonapi, :json_library, Jason)

if Code.ensure_loaded?(module) do
Expand All @@ -30,7 +30,5 @@ defmodule JSONAPI do
@doc """
This returns the MIME type for JSONAPIs
"""
def mime_type() do
@mime_type
end
def mime_type, do: @mime_type
end
4 changes: 2 additions & 2 deletions lib/jsonapi/serializer.ex
Expand Up @@ -5,8 +5,8 @@ defmodule JSONAPI.Serializer do

import JSONAPI.Ecto, only: [assoc_loaded?: 1]

alias JSONAPI.Utils.String, as: JString
alias JSONAPI.Config
alias JSONAPI.{Config, Utils}
alias Utils.String, as: JString

require Logger

Expand Down

0 comments on commit 887699e

Please sign in to comment.