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

demo how to set default values for sqale #469

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,16 @@ public void define(Context context) {
}
}
}

//i18nLoader.load(repository); //@todo?

for (NewRule rule : repository.rules()) {
rule
//FIXME: set internal key to key to ensure rule templates works properly : should be removed when SONAR-6162 is fixed.
.setInternalKey(rule.key())
// set default Technical Debt values for 'other' rules
.setDebtSubCharacteristic("ERRORS")
Copy link
Member

Choose a reason for hiding this comment

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

i think we should not do this, setting these defaults values are going to cause more issues than not. Because most issues from other rules are not belonging any "default". Same goes for time to fix. adding default values like you are over or uderestimating everything that goes into sonar

I tought you would more including a parser for users to define their own values, imo that would be more usefull.

.setDebtRemediationFunction(rule.debtRemediationFunctions().constantPerIssue("1h"));
}

repository.done();
}

Expand Down