diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md new file mode 100755 index 0000000..5683d03 --- /dev/null +++ b/.chglog/CHANGELOG.tpl.md @@ -0,0 +1,56 @@ +{{ if .Versions -}} + +## [Unreleased] + +{{ if .Unreleased.CommitGroups -}} +{{ range .Unreleased.CommitGroups -}} +### {{ .Title }} +{{ range .Commits -}} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +{{ end }} +{{ end -}} +{{ end -}} +{{ end -}} + +{{ range .Versions }} + +## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }} +{{ range .CommitGroups -}} +### {{ .Title }} +{{ range .Commits -}} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +{{ end }} +{{ end -}} + +{{- if .RevertCommits -}} +### Reverts +{{ range .RevertCommits -}} +- {{ .Revert.Header }} +{{ end }} +{{ end -}} + +{{- if .MergeCommits -}} +### Pull Requests +{{ range .MergeCommits -}} +- {{ .Header }} +{{ end }} +{{ end -}} + +{{- if .NoteGroups -}} +{{ range .NoteGroups -}} +### {{ .Title }} +{{ range .Notes }} +{{ .Body }} +{{ end }} +{{ end -}} +{{ end -}} +{{ end -}} + +{{- if .Versions }} +[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD +{{ range .Versions -}} +{{ if .Tag.Previous -}} +[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }} +{{ end -}} +{{ end -}} +{{ end -}} \ No newline at end of file diff --git a/.chglog/config.yml b/.chglog/config.yml new file mode 100755 index 0000000..28f7c95 --- /dev/null +++ b/.chglog/config.yml @@ -0,0 +1,32 @@ +style: github +template: CHANGELOG.tpl.md +info: + title: CHANGELOG + repository_url: https://github.com/hauleth/mix_unused +options: + tag_filter_pattern: "^v" + sort: "date" + commits: + filters: + Type: + - ft + - feat + - fix + - docs + commit_groups: + sort_by: Subject + group_by: Type + title_maps: + feat: Features + ft: Features + fix: Bug Fixes + perf: Performance Improvements + refactor: Code Refactoring + header: + pattern: "^(\\w*)\\:\\s(.*)$" + pattern_maps: + - Type + - Subject + notes: + keywords: + - BREAKING CHANGE diff --git a/CHANGELEOG.md b/CHANGELEOG.md new file mode 100644 index 0000000..4d5ea5a --- /dev/null +++ b/CHANGELEOG.md @@ -0,0 +1,49 @@ + +## v0.2.0 - 2021-09-27 + +### Chore +- release v0.2.0 +- add Credo +- fix formatting +- split code into modules for easier testing + +### Docs +- improve documentation of `compile.unused` + +### Fix +- print path to file as a relative path +- test against "textual" representation of atoms as well + +### Ft +- add support for macros +- sort results to return predictable results +- allow filtering using regular expressions + + + +## v0.1.0 - 2021-08-28 +### Chore +- prepare first release +- add GitHub Actions + +### Docs +- write documentation and provide basic options + +### Feat +- simplify matching patterns by allow just atoms and 2-ary tuples +- update filtering +- add module.behaviour_info/1 to list of ignored built ins + +### Fix +- ignore additional flags +- remove inspect + +### Ft +- migrate to compiler tracers + +### Pull Requests +- Merge pull request [#3](https://github.com/hauleth/mix_unused/issues/3) from hauleth/chore/add-ci-actions +- Merge pull request [#2](https://github.com/hauleth/mix_unused/issues/2) from hauleth/ft/migrate-to-compiler-tracers + + +[Unreleased]: https://github.com/hauleth/mix_unused/compare/v0.1.0...HEAD diff --git a/README.md b/README.md index ef275c6..767cb93 100644 --- a/README.md +++ b/README.md @@ -4,20 +4,15 @@ Mix compiler tracer for detecting unused public functions. ## Installation -If [available in Hex](https://hex.pm/docs/publish), the package can be installed -by adding `mix_unused` to your list of dependencies in `mix.exs`: - ```elixir def deps do [ - {:mix_unused, "~> 0.1.0"} + {:mix_unused, "~> 0.2.0"} ] end ``` -Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc) -and published on [HexDocs](https://hexdocs.pm). Once published, the docs can -be found at [https://hexdocs.pm/mix_unused](https://hexdocs.pm/mix_unused). +The docs can be found at [https://hexdocs.pm/mix_unused](https://hexdocs.pm/mix_unused). ## Usage diff --git a/mix.exs b/mix.exs index c310700..eed6d6c 100644 --- a/mix.exs +++ b/mix.exs @@ -5,7 +5,7 @@ defmodule MixUnused.MixProject do [ app: :mix_unused, description: "Mix compiler tracer for detecting unused public functions", - version: "0.1.0", + version: "0.2.0", elixir: "~> 1.10", package: [ licenses: ~w[MPL-2.0],