Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YAML config file #16

Merged
merged 3 commits into from
Nov 14, 2017
Merged

YAML config file #16

merged 3 commits into from
Nov 14, 2017

Conversation

veelenga
Copy link
Member

@veelenga veelenga commented Nov 14, 2017

This PR prepares the following additions:

  • Ameba runner
  • YAML config loader
  • Macro for Rule configuration properties
  • YAML documented properties
  • Sample configuration file
  • CLI args

So now it is possible to define rule properties using prop macro:

struct SuperRule < Base
  prop max_length = 80
  prop enabled? = true
  prop wildcard = "*"

  def test(source)
    pp max_length, enabled?, wildcard
  end
end

which will automatically be mapped to MaxLength configuration property in YAML configuration file:

SuperRule:
  Enabled: false
  MaxLength: 100
  Wildcard: ".*" 

Closes #8

@veelenga veelenga merged commit 8f4def5 into master Nov 14, 2017
@veelenga veelenga deleted the feat/config branch November 14, 2017 11:14
@Sija Sija added the feature label Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configuration file .ameba.yml
2 participants