Skip to content

Use ruleset.xml by default if present #18

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

Merged
merged 4 commits into from
Sep 25, 2017

Conversation

filipesperandio
Copy link
Contributor

No description provided.

@@ -34,6 +34,11 @@ class Config {
}
}

def prjRulesByConvention = new File(appContext.codeFolder, "ruleset.xml")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is prj an abbreviation for project? Is it a common one in Groovy? If not, I'd suggest using the full word instead.


@Test
public void honorPresentRules() {
def config = new Config([configFile: "/usr/src/app/fixtures/config.json", codeFolder: "/usr/src/app/fixtures/honor"])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the name /honor mean in the path? Is this a fixture directory just for this test?

If yes, I might suggest something more explicit like /ruleset_default, and maybe moving specified_rules.xml and config.rule.json to something like /ruleset_specified.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@toddmazierski Re-structured fixture directory. Do you mind giving another shot?

@filipesperandio
Copy link
Contributor Author

@toddmazierski I liked your suggestion about the fixtures, the final structure is much easier to understand:

fixtures/
├── bad_config
│   ├── Main.java
│   └── config.json
├── default
│   ├── Main.java
│   └── config.json
├── ruleset_default_file
│   ├── Main.java
│   ├── config.json
│   └── ruleset.xml
└── specified_file
    ├── Main.java
    ├── config.new.json
    ├── config.old.json
    └── rules.xml

Copy link

@toddmazierski toddmazierski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rock on. Thanks for considering those suggestions. 🚀

@filipesperandio filipesperandio merged commit 01c813b into master Sep 25, 2017
@filipesperandio filipesperandio deleted the fe/standard_rules_file branch September 25, 2017 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants