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

Confusing buildSmells configuration #66

Open
martinlau opened this issue Jul 28, 2016 · 0 comments
Open

Confusing buildSmells configuration #66

martinlau opened this issue Jul 28, 2016 · 0 comments

Comments

@martinlau
Copy link

martinlau commented Jul 28, 2016

<buildSmells> is documented as the smells to include, however the code in TileValidator.validateModel complains if the smell is NOT included in the configured build smells. For example:

if (model.repositories && !buildSmells.contains(SMELL_REPOSITORIES)) {
    log.error("Tile follows bad practice and has repositories section. Please use settings.xml.")
    validModel = null
}

That is, if the model contains repositories, and buildSmells does NOT contain "repositories", then complain.

As I see it there are a couple of non-ideal options:

  1. update documentation on how to use <buildSmells> (however <buildSmells>xxx</buildSmells> being used to exclude xxx violates the principal of least surprise IMHO)
  2. flip the logic on <buildSmells> to make this the definitive list of what to use, rather than what to exclude (however this breaks existing users)
  3. mark <buildSmells> as deprecated and introduce <excludeBuildSmells> to make the existing logic explicit (this also opens the door for <includeBuildSmells> which means if you add a new smell I don't need to go through and manually exclude it everywhere I disagree with it - it's a opt-in model rather than opt-out).

Discuss, and a PR shall be yours.

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

No branches or pull requests

1 participant