From 857b9c9adff7b83488ee61e3d3ddfea2ec110672 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 2 Aug 2021 14:34:18 -0400 Subject: [PATCH] Exclude 'fixme'/'help_request' warnings from changeset tags. They still appear in the issue list and in the entity editor. (closes #8603) --- modules/ui/commit.js | 5 ++++- modules/ui/commit_warnings.js | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/ui/commit.js b/modules/ui/commit.js index 5beec1448..b641ea3d8 100644 --- a/modules/ui/commit.js +++ b/modules/ui/commit.js @@ -193,7 +193,10 @@ export function uiCommit(context) { // add counts of warnings generated by the user's edits var warnings = context.validator() - .getIssuesBySeverity({ what: 'edited', where: 'all', includeIgnored: true, includeDisabledRules: true }).warning; + .getIssuesBySeverity({ what: 'edited', where: 'all', includeIgnored: true, includeDisabledRules: true }) + .warning + .filter(function(issue) { return issue.type !== 'help_request'; }); // exclude 'fixme' and similar - #8603 + addIssueCounts(warnings, 'warnings'); // add counts of issues resolved by the user's edits diff --git a/modules/ui/commit_warnings.js b/modules/ui/commit_warnings.js index 5c968e421..e02656c2c 100644 --- a/modules/ui/commit_warnings.js +++ b/modules/ui/commit_warnings.js @@ -12,6 +12,11 @@ export function uiCommitWarnings(context) { for (var severity in issuesBySeverity) { var issues = issuesBySeverity[severity]; + + if (severity !== 'error') { // exclude 'fixme' and similar - #8603 + issues = issues.filter(function(issue) { return issue.type !== 'help_request'; }); + } + var section = severity + '-section'; var issueItem = severity + '-item';