intenthq / anon

A UNIX Command To Anonymise Data
MIT License
354 stars 14 forks source link

Add support for salts within the `hash` action. #17

Closed albertpastrana closed 6 years ago

albertpastrana commented 6 years ago

Fixes #12. The config is slightly different to the one proposed but I think it still makes sense.

During this changes, I've also moved the validation from Config to each specific action. Currently this only affects year and ranges, whose create can return an error.

Because of this, the anonymisations function can now fail and returns an error in case there name can't be match or if the specific action can't be created.

albertpastrana commented 6 years ago

@kittsville based on your comment if you want to take a look @nathankleyn feel free to review it too :-)

codecov[bot] commented 6 years ago

Codecov Report

Merging #17 into master will increase coverage by 6.51%. The diff coverage is 88.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #17      +/-   ##
==========================================
+ Coverage   65.87%   72.38%   +6.51%     
==========================================
  Files           3        3              
  Lines         126      134       +8     
==========================================
+ Hits           83       97      +14     
+ Misses         41       35       -6     
  Partials        2        2
Impacted Files Coverage Δ
config.go 100% <ø> (ø) :arrow_up:
main.go 37.28% <0%> (-0.65%) :arrow_down:
anonymisations.go 100% <100%> (+15.9%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 422bf64...dcef447. Read the comment docs.