From fbab2e42e6b0ff33694b13b2735328cb58205075 Mon Sep 17 00:00:00 2001 From: Finley8 Date: Tue, 12 Dec 2023 15:02:01 -0500 Subject: [PATCH] update --- .chasten/Zhu_.yml | 36 +++++++++++++++++++++++++++++++++++- .chasten/checks.yml | 39 +-------------------------------------- 2 files changed, 36 insertions(+), 39 deletions(-) diff --git a/.chasten/Zhu_.yml b/.chasten/Zhu_.yml index c862f8d..c4b72b8 100644 --- a/.chasten/Zhu_.yml +++ b/.chasten/Zhu_.yml @@ -76,4 +76,38 @@ checks: count: min: null max: null - + - name: "is-void" + code: "IVI" + id: "V001" + pattern: "//method[@returnType='void']" + count: + min: null + max: null + - name: "non-void-percent" + code: "NVP" + id: "V002" + pattern: "count(/class/method[@returnType != 'void'])" + count: + min: null + max: null + - name: "getter-percent" + code: "GPT" + id: "GP001" + pattern: "concat(count(//method[starts-with(@name, 'get') or starts-with(@name, 'is')]), '/', count(//method[starts-with(@name, 'get') or starts-with(@name, 'is')]))" + count: + min: null + max: null + - name: "is-public" + code: "IPP" + id: "IP001" + pattern: "//method[@access='public']" + count: + min: null + max: null + - name: "is-static" + code: "IST" + id: "IS001" + pattern: "//method[(@static) or @static='true']" + count: + min: null + max: null diff --git a/.chasten/checks.yml b/.chasten/checks.yml index a4c1281..9a228ab 100644 --- a/.chasten/checks.yml +++ b/.chasten/checks.yml @@ -33,41 +33,4 @@ checks: pattern: './/FunctionDef/body//If[ancestor::If and not(parent::orelse)]' count: min: 1 - max: 15 - - - name: "is-void" - code: "IVI" - id: "V001" - pattern: "//method[@returnType='void']" - count: - min: null - max: null - - name: "non-void-percent" - code: "NVP" - id: "V002" - pattern: "count(/class/method[@returnType != 'void'])" - count: - min: null - max: null - - name: "getter-percent" - code: "GPT" - id: "GP001" - pattern: "concat(count(//method[starts-with(@name, 'get') or starts-with(@name, 'is')]), '/', count(//method[starts-with(@name, 'get') or starts-with(@name, 'is')]))" - count: - min: null - max: null - - name: "is-public" - code: "IPP" - id: "IP001" - pattern: "//method[@access='public']" - count: - min: null - max: null - - name: "is-static" - code: "IST" - id: "IS001" - pattern: "//method[(@static) or @static='true']" - count: - min: null - max: null - + max: 15 \ No newline at end of file