@@ -13,11 +13,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313See the License for the specific language governing permissions and
1414limitations under the License.
1515 */
16- const { isMatch, merge } = require ( "lodash" )
16+ const { isMatch, merge } = require ( "lodash" ) ;
1717async function handle ( {
1818 getFindings,
1919 updateFindings,
20- rules = JSON . parse ( process . env [ "RULES" ] ) ,
20+ rules = JSON . parse ( process . env [ "RULES" ] ) ,
2121} ) {
2222 const findings = await getFindings ( ) ;
2323 const res = applyRules ( rules , findings ) ;
@@ -32,18 +32,20 @@ module.exports.handle = handle;
3232 */
3333function applyRules ( rules , findings ) {
3434 let hasChanged = false ;
35- const newFindings = findings . map ( finding => {
35+ const newFindings = findings . map ( ( finding ) => {
3636 let newFinding = finding ;
3737 for ( const rule of rules ) {
38- const isRuleMatching = rule . matches . anyOf . some ( condition => isMatch ( finding , condition ) ) ;
38+ const isRuleMatching = rule . matches . anyOf . some ( ( condition ) =>
39+ isMatch ( finding , condition )
40+ ) ;
3941 if ( isRuleMatching ) {
4042 hasChanged = true ;
4143 newFinding = postProcessFinding ( finding , rule ) ;
4244 }
4345 }
4446 return newFinding ;
4547 } ) ;
46- return { hasChanged, findings : newFindings }
48+ return { hasChanged, findings : newFindings } ;
4749}
4850
4951function postProcessFinding ( finding , rule ) {
0 commit comments