Page MenuHomePhabricator

It is not possible to change message severities for Cppcheck linter
Needs RevisionPublic

Authored by felipe.zanoni on Sep 15 2014, 4:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 11, 7:37 AM
Unknown Object (File)
Fri, Nov 8, 8:11 AM
Unknown Object (File)
Sat, Nov 2, 8:07 AM
Unknown Object (File)
Mon, Oct 28, 3:38 PM
Unknown Object (File)
Sep 17 2024, 7:27 AM
Unknown Object (File)
Sep 10 2024, 3:04 AM
Unknown Object (File)
Sep 6 2024, 5:36 PM
Unknown Object (File)
Aug 30 2024, 11:10 PM
Subscribers

Details

Reviewers
joshuaspence
epriestley
Group Reviewers
Blessed Reviewers
Summary

It was not possible to change message severeties for Cppcheck linter using custom parameters (like using .arclint config file).
Two functions were missing and have been implemented: getDefaultMessageSeverity and getLintCodeFromLinterConfigurationKey.
Also the function parseLinterOutput has been updated in order to get the correct severity for each message.

Test Plan

Get a cpp file with 'performace' issue reported by Cppcheck linter.
Running 'arc lint' should report no errors since 'performance' is a SEVERITY_ADVICE message.
Change the .arclint config to set 'performance' message as 'error' and run 'arc lint' again.
Now it should report a lint error on that file.

Diff Detail

Repository
rARC Arcanist
Branch
master
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 2546
Build 2550: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

felipe.zanoni retitled this revision from to It is not possible to change message severities for Cppcheck linter.
felipe.zanoni updated this object.
felipe.zanoni edited the test plan for this revision. (Show Details)
felipe.zanoni added a reviewer: epriestley.
joshuaspence edited edge metadata.

LGTM

src/lint/linter/ArcanistCppcheckLinter.php
103

Dead code.

106

Dead code.

joshuaspence edited edge metadata.

This should wait until after T8474. Specifically, many linters suffer from this problem and T8474 should resolve this universally.

This revision now requires changes to proceed.Jun 21 2015, 9:43 PM