zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

mix.exs (4312B)


      1 defmodule Credo.Mixfile do
      2   use Mix.Project
      3 
      4   @version "1.6.7"
      5 
      6   def project do
      7     [
      8       app: :credo,
      9       version: @version,
     10       elixir: ">= 1.7.0",
     11       escript: [main_module: Credo.CLI],
     12       build_embedded: Mix.env() == :prod,
     13       start_permanent: Mix.env() == :prod,
     14       deps: deps(),
     15       test_coverage: [tool: ExCoveralls],
     16       preferred_cli_env: [coveralls: :test, "coveralls.html": :test, "test.fast": :test],
     17       name: "Credo",
     18       description: "A static code analysis tool with a focus on code consistency and teaching.",
     19       package: package(),
     20       source_url: "https://github.com/rrrene/credo",
     21       docs: docs(),
     22       aliases: aliases()
     23     ]
     24   end
     25 
     26   defp docs do
     27     [
     28       source_ref: "v#{@version}",
     29       main: "overview",
     30       logo: "assets/credo-logo-with-trail.png",
     31       extra_section: "GUIDES",
     32       assets: "guides/assets",
     33       formatters: ["html"],
     34       nest_modules_by_prefix: nest_modules_by_prefix(),
     35       groups_for_modules: groups_for_modules(),
     36       extras: extras(),
     37       groups_for_extras: groups_for_extras()
     38     ]
     39   end
     40 
     41   defp nest_modules_by_prefix do
     42     [
     43       Credo.Check.Design,
     44       Credo.Check.Readability,
     45       Credo.Check.Refactor,
     46       Credo.Check.Warning,
     47       Credo.Check.Consistency
     48     ]
     49   end
     50 
     51   defp extras do
     52     [
     53       "CHANGELOG.md",
     54 
     55       # Introduction
     56 
     57       "guides/introduction/overview.md",
     58       "guides/introduction/installation.md",
     59       "guides/introduction/basic_usage.md",
     60       "guides/introduction/exit_statuses.md",
     61       "guides/introduction/mix_tasks.md",
     62 
     63       # Commands
     64 
     65       "guides/commands/suggest_command.md",
     66       "guides/commands/diff_command.md",
     67       "guides/commands/explain_command.md",
     68       "guides/commands/list_command.md",
     69 
     70       # Checks
     71 
     72       "guides/custom_checks/adding_checks.md",
     73       "guides/custom_checks/testing_checks.md",
     74 
     75       # Configuration
     76 
     77       "guides/configuration/config_file.md",
     78       "guides/configuration/cli_switches.md",
     79       "guides/configuration/config_comments.md",
     80       "guides/configuration/check_params.md",
     81 
     82       # Plugins
     83 
     84       "guides/plugins/using_plugins.md",
     85       "guides/plugins/creating_plugins.md"
     86     ]
     87   end
     88 
     89   defp groups_for_extras do
     90     [
     91       Introduction: ~r/guides\/introduction\/.?/,
     92       Configuration: ~r/guides\/configuration\//,
     93       Commands: ~r/guides\/commands\//,
     94       "Custom Checks": ~r/guides\/custom_checks\//,
     95       Plugins: ~r/guides\/plugins\//
     96     ]
     97   end
     98 
     99   defp groups_for_modules do
    100     [
    101       "Essential Behaviours": ~r/^Credo\.(Check|Plugin)$/,
    102       "Essential Structs": ~r/^Credo\.(Execution|Issue|IssueMeta|SourceFile)$/,
    103       "Code Analysis": ~r/^Credo\.Code(\.[^\.]+|)$/,
    104       "Testing Utilities": ~r/^Credo\.Test\./,
    105       "Check Utilities": ~r/^Credo\.Check(\.[^\.]+|)$/,
    106       "Checks: Software Design": ~r/^Credo\.Check\.Design\./,
    107       "Checks: Code Readability": ~r/^Credo\.Check\.Readability\./,
    108       "Checks: Refactoring Opportunities": ~r/^Credo\.Check\.Refactor\./,
    109       "Checks: Warnings": ~r/^Credo\.Check\.Warning\./,
    110       "Checks: Consistency": ~r/^Credo\.Check\.Consistency\./,
    111       "Commands & CLI": ~r/^Credo\.CLI(\.[^\.]+|)$/,
    112       Internal: ~r/^Credo\..+/
    113     ]
    114   end
    115 
    116   defp package do
    117     [
    118       files: [
    119         ".credo.exs",
    120         ".template.check.ex",
    121         ".template.debug.html",
    122         "lib",
    123         "LICENSE",
    124         "mix.exs",
    125         "README.md"
    126       ],
    127       maintainers: ["René Föhring"],
    128       licenses: ["MIT"],
    129       links: %{
    130         "GitHub" => "https://github.com/rrrene/credo",
    131         "Changelog" => "https://github.com/rrrene/credo/blob/master/CHANGELOG.md"
    132       }
    133     ]
    134   end
    135 
    136   def application do
    137     [
    138       mod: {Credo.Application, []},
    139       extra_applications: [:bunt, :crypto, :eex, :ex_unit, :file_system, :inets, :jason, :logger]
    140     ]
    141   end
    142 
    143   defp deps do
    144     [
    145       {:file_system, "~> 0.2.8"},
    146       {:bunt, "~> 0.2.1"},
    147       {:jason, "~> 1.0"},
    148       {:ex_doc, "~> 0.25", only: :dev, runtime: false},
    149       {:excoveralls, "~> 0.10", only: :test},
    150       {:inch_ex, "~> 2.0", only: [:dev, :test], runtime: false}
    151     ]
    152   end
    153 
    154   defp aliases do
    155     [
    156       test: "test --exclude slow --include slow:disk_io",
    157       "test.fast": "test --exclude slow",
    158       "test.slow": "test --include slow"
    159     ]
    160   end
    161 end