forked from saschawildgrube/servicenow-codesanity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request saschawildgrube#21 from saschawildgrube/dev
Dev
- Loading branch information
Showing
143 changed files
with
5,334 additions
and
223 deletions.
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
...9619ce/author_elective_update/scan_check_suite_check_ac1630731b11e1105b76777d8b4bcb44.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?xml version="1.0" encoding="UTF-8"?><record_update table="scan_check_suite_check"> | ||
<scan_check_suite_check action="DELETE"> | ||
<check display_value="CodeSanity - Comment containing "TODO"">7e9030731b11e1105b76777d8b4bcb19</check> | ||
<score_weight>1</score_weight> | ||
<suite display_value="CodeSanity">4fcb181bdb4a8510bcced03cd39619eb</suite> | ||
<sys_class_name>scan_check_suite_check</sys_class_name> | ||
<sys_created_by>admin</sys_created_by> | ||
<sys_created_on>2023-03-07 10:57:19</sys_created_on> | ||
<sys_id>ac1630731b11e1105b76777d8b4bcb44</sys_id> | ||
<sys_mod_count>0</sys_mod_count> | ||
<sys_name/> | ||
<sys_package display_value="CodeSanity WORK IN PROGRESS" source="x_snc_codesanity">8ed42c23dbad0510bcced03cd39619ce</sys_package> | ||
<sys_policy/> | ||
<sys_scope display_value="CodeSanity WORK IN PROGRESS">8ed42c23dbad0510bcced03cd39619ce</sys_scope> | ||
<sys_update_name>scan_check_suite_check_ac1630731b11e1105b76777d8b4bcb44</sys_update_name> | ||
<sys_updated_by>admin</sys_updated_by> | ||
<sys_updated_on>2023-03-07 10:57:19</sys_updated_on> | ||
</scan_check_suite_check> | ||
<sys_update_version action="INSERT_OR_UPDATE"> | ||
<action>DELETE</action> | ||
<application display_value="CodeSanity WORK IN PROGRESS">8ed42c23dbad0510bcced03cd39619ce</application> | ||
<file_path/> | ||
<instance_id>01bfa2ffdb5ecd104d2bac44d496195a</instance_id> | ||
<instance_name>wildgrubetestsandiego</instance_name> | ||
<name>scan_check_suite_check_ac1630731b11e1105b76777d8b4bcb44</name> | ||
<payload><![CDATA[<?xml version="1.0" encoding="UTF-8"?><record_update table="scan_check_suite_check"><scan_check_suite_check action="INSERT_OR_UPDATE"><check display_value="CodeSanity - Comment containing "TODO"">7e9030731b11e1105b76777d8b4bcb19</check><score_weight>1</score_weight><suite display_value="CodeSanity">4fcb181bdb4a8510bcced03cd39619eb</suite><sys_class_name>scan_check_suite_check</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2023-03-07 10:57:19</sys_created_on><sys_id>ac1630731b11e1105b76777d8b4bcb44</sys_id><sys_mod_count>0</sys_mod_count><sys_name/><sys_package display_value="CodeSanity WORK IN PROGRESS" source="x_snc_codesanity">8ed42c23dbad0510bcced03cd39619ce</sys_package><sys_policy/><sys_scope display_value="CodeSanity WORK IN PROGRESS">8ed42c23dbad0510bcced03cd39619ce</sys_scope><sys_update_name>scan_check_suite_check_ac1630731b11e1105b76777d8b4bcb44</sys_update_name><sys_updated_by>admin</sys_updated_by><sys_updated_on>2023-03-07 10:57:19</sys_updated_on></scan_check_suite_check></record_update>]]></payload> | ||
<payload_hash>2002997053</payload_hash> | ||
<record_name>7e9030731b11e1105b76777d8b4bcb19</record_name> | ||
<reverted_from/> | ||
<source>1f7faf701b38e1105b76777d8b4bcb94</source> | ||
<source_table>sys_update_set</source_table> | ||
<state>previous</state> | ||
<sys_created_by>admin</sys_created_by> | ||
<sys_created_on>2023-03-07 10:57:19</sys_created_on> | ||
<sys_id>e01630731b11e1105b76777d8b4bcb47</sys_id> | ||
<sys_mod_count>0</sys_mod_count> | ||
<sys_recorded_at>186bbb7efef0000001</sys_recorded_at> | ||
<sys_updated_by>admin</sys_updated_by> | ||
<sys_updated_on>2023-03-07 10:57:19</sys_updated_on> | ||
<type>Suite Check</type> | ||
<update_guid>2c1630735b11e110dc7c2c14d7ce3046</update_guid> | ||
<update_guid_history>2c1630735b11e110dc7c2c14d7ce3046:2002997053</update_guid_history> | ||
</sys_update_version> | ||
<sys_metadata_delete action="INSERT_OR_UPDATE"> | ||
<sys_audit_delete display_value="">322c38bf1b11e1105b76777d8b4bcb4c</sys_audit_delete> | ||
<sys_class_name>sys_metadata_delete</sys_class_name> | ||
<sys_created_by>admin</sys_created_by> | ||
<sys_created_on>2023-03-07 11:23:57</sys_created_on> | ||
<sys_db_object display_value="" name="scan_check_suite_check">scan_check_suite_check</sys_db_object> | ||
<sys_id>b799793d12e7465ebc2d14e6a4692cd1</sys_id> | ||
<sys_metadata>ac1630731b11e1105b76777d8b4bcb44</sys_metadata> | ||
<sys_mod_count>0</sys_mod_count> | ||
<sys_name/> | ||
<sys_package display_value="CodeSanity WORK IN PROGRESS" source="x_snc_codesanity">8ed42c23dbad0510bcced03cd39619ce</sys_package> | ||
<sys_parent/> | ||
<sys_policy/> | ||
<sys_scope display_value="CodeSanity WORK IN PROGRESS">8ed42c23dbad0510bcced03cd39619ce</sys_scope> | ||
<sys_scope_delete display_value="">8c01c38fa81d4fae9bac60e1bb586744</sys_scope_delete> | ||
<sys_update_name>scan_check_suite_check_ac1630731b11e1105b76777d8b4bcb44</sys_update_name> | ||
<sys_update_version display_value="scan_check_suite_check_ac1630731b11e1105b76777d8b4bcb44">e01630731b11e1105b76777d8b4bcb47</sys_update_version> | ||
<sys_updated_by>admin</sys_updated_by> | ||
<sys_updated_on>2023-03-07 11:23:57</sys_updated_on> | ||
</sys_metadata_delete> | ||
</record_update> |
113 changes: 113 additions & 0 deletions
113
...03cd39619ce/author_elective_update/scan_linter_check_7e9030731b11e1105b76777d8b4bcb19.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
<?xml version="1.0" encoding="UTF-8"?><record_update table="scan_linter_check"> | ||
<scan_linter_check action="DELETE"> | ||
<active>true</active> | ||
<category>code_sanity</category> | ||
<description>A source code comment containing "TODO" (and other typical patterns) indicates unfinished work or unaltered template code. When an application version is baselined, such cases whould be resolved. </description> | ||
<documentation_url/> | ||
<finding_type>scan_finding</finding_type> | ||
<name>CodeSanity - Comment containing "TODO"</name> | ||
<priority>1</priority> | ||
<resolution_details>Finish the unfinished work and/or modify template code so that the reason for the "TODO" comment is resolved. </resolution_details> | ||
<run_condition/> | ||
<score_max>100</score_max> | ||
<score_min>0</score_min> | ||
<score_scale>1</score_scale> | ||
<script><![CDATA[(function (engine) { | ||
if (x_snc_codesanity.IsCheckApplicableToRecord()) | ||
{ | ||
var GetStringValue = x_snc_devtools.GetStringValue; | ||
var StringFindRegEx = x_snc_devtools.StringFindRegEx; | ||
var strSource = GetStringValue(engine.rootNode.toSource()); | ||
if (StringFindRegEx(strSource,'\\\/\\\/\\s*TODO','i') != -1) | ||
{ | ||
engine.finding.increment(); | ||
} | ||
/*if (StringFindRegEx(strSource,'\/\\*\\s*TODO','i') != -1) | ||
{ | ||
engine.finding.increment(); | ||
}*/ | ||
} | ||
})(engine);]]></script> | ||
<short_description>Source code comments should not contain "TODO"</short_description> | ||
<sys_class_name>scan_linter_check</sys_class_name> | ||
<sys_created_by>admin</sys_created_by> | ||
<sys_created_on>2023-03-07 10:57:19</sys_created_on> | ||
<sys_id>7e9030731b11e1105b76777d8b4bcb19</sys_id> | ||
<sys_mod_count>11</sys_mod_count> | ||
<sys_name>CodeSanity - Comment containing "TODO"</sys_name> | ||
<sys_package display_value="CodeSanity WORK IN PROGRESS" source="x_snc_codesanity">8ed42c23dbad0510bcced03cd39619ce</sys_package> | ||
<sys_policy/> | ||
<sys_scope display_value="CodeSanity WORK IN PROGRESS">8ed42c23dbad0510bcced03cd39619ce</sys_scope> | ||
<sys_update_name>scan_linter_check_7e9030731b11e1105b76777d8b4bcb19</sys_update_name> | ||
<sys_updated_by>admin</sys_updated_by> | ||
<sys_updated_on>2023-03-07 11:20:05</sys_updated_on> | ||
</scan_linter_check> | ||
<sys_update_version action="INSERT_OR_UPDATE"> | ||
<action>DELETE</action> | ||
<application display_value="CodeSanity WORK IN PROGRESS">8ed42c23dbad0510bcced03cd39619ce</application> | ||
<file_path/> | ||
<instance_id>01bfa2ffdb5ecd104d2bac44d496195a</instance_id> | ||
<instance_name>wildgrubetestsandiego</instance_name> | ||
<name>scan_linter_check_7e9030731b11e1105b76777d8b4bcb19</name> | ||
<payload><?xml version="1.0" encoding="UTF-8"?><record_update table="scan_linter_check"><scan_linter_check action="INSERT_OR_UPDATE"><active>true</active><category>code_sanity</category><description>A source code comment containing "TODO" (and other typical patterns) indicates unfinished work or unaltered template code. When an application version is baselined, such cases whould be resolved. </description><documentation_url/><finding_type>scan_finding</finding_type><name>CodeSanity - Comment containing "TODO"</name><priority>1</priority><resolution_details>Finish the unfinished work and/or modify template code so that the reason for the "TODO" comment is resolved. </resolution_details><run_condition/><score_max>100</score_max><score_min>0</score_min><score_scale>1</score_scale><script><![CDATA[(function (engine) { | ||
|
||
if (x_snc_codesanity.IsCheckApplicableToRecord()) | ||
{ | ||
var GetStringValue = x_snc_devtools.GetStringValue; | ||
var StringFindRegEx = x_snc_devtools.StringFindRegEx; | ||
|
||
var strSource = GetStringValue(engine.rootNode.toSource()); | ||
|
||
if (StringFindRegEx(strSource,'\\\/\\\/\\s*TODO','i') != -1) | ||
{ | ||
engine.finding.increment(); | ||
} | ||
/*if (StringFindRegEx(strSource,'\/\\*\\s*TODO','i') != -1) | ||
{ | ||
engine.finding.increment(); | ||
}*/ | ||
} | ||
|
||
})(engine);]]></script><short_description>Source code comments should not contain "TODO"</short_description><sys_class_name>scan_linter_check</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2023-03-07 10:57:19</sys_created_on><sys_id>7e9030731b11e1105b76777d8b4bcb19</sys_id><sys_mod_count>11</sys_mod_count><sys_name>CodeSanity - Comment containing "TODO"</sys_name><sys_package display_value="CodeSanity WORK IN PROGRESS" source="x_snc_codesanity">8ed42c23dbad0510bcced03cd39619ce</sys_package><sys_policy/><sys_scope display_value="CodeSanity WORK IN PROGRESS">8ed42c23dbad0510bcced03cd39619ce</sys_scope><sys_update_name>scan_linter_check_7e9030731b11e1105b76777d8b4bcb19</sys_update_name><sys_updated_by>admin</sys_updated_by><sys_updated_on>2023-03-07 11:20:05</sys_updated_on></scan_linter_check></record_update></payload> | ||
<payload_hash>-642844089</payload_hash> | ||
<record_name>CodeSanity - Comment containing "TODO"</record_name> | ||
<reverted_from/> | ||
<source>1f7faf701b38e1105b76777d8b4bcb94</source> | ||
<source_table>sys_update_set</source_table> | ||
<state>previous</state> | ||
<sys_created_by>admin</sys_created_by> | ||
<sys_created_on>2023-03-07 11:20:05</sys_created_on> | ||
<sys_id>8a4b383f1b11e1105b76777d8b4bcb8f</sys_id> | ||
<sys_mod_count>0</sys_mod_count> | ||
<sys_recorded_at>186bbccca0b0000001</sys_recorded_at> | ||
<sys_updated_by>admin</sys_updated_by> | ||
<sys_updated_on>2023-03-07 11:20:05</sys_updated_on> | ||
<type>Linter Check</type> | ||
<update_guid>824b383fc111e110a7df383c9564088f</update_guid> | ||
<update_guid_history>824b383fc111e110a7df383c9564088f:-642844089,423b783fa711e110449680f62b1e4244:-1863220723,e4caf8fb5b11e110bcb1457d4a575104:-2035214675,7c7ab4fb4a11e110f964d35bb82b3ba3:-804722905,291a38bb1e11e110874bff06be5028a2:1307843013,62f7f83b3711e110a5ea4c7ebc4bdf28:-818633537,dee7b83bcb11e110f49464521e957116:1147539699,14d7383b8e11e1108e334b8e6fe93766:383325171,72c7343baa11e110f438008f2139cb40:-605292069,a78730f7e811e110b8f52e2b18ad0809:-1707650629,b2b634f7ef11e110ac6262e6308002b7:1689850462,60163073cc11e110b5f6fe362f0a6948:273614174</update_guid_history> | ||
</sys_update_version> | ||
<sys_metadata_delete action="INSERT_OR_UPDATE"> | ||
<sys_audit_delete display_value="CodeSanity - Comment containing "TODO"">fa2c38bf1b11e1105b76777d8b4bcb51</sys_audit_delete> | ||
<sys_class_name>sys_metadata_delete</sys_class_name> | ||
<sys_created_by>admin</sys_created_by> | ||
<sys_created_on>2023-03-07 11:23:58</sys_created_on> | ||
<sys_db_object display_value="" name="scan_linter_check">scan_linter_check</sys_db_object> | ||
<sys_id>371d2e52cb4e44d893ab79e20b3de310</sys_id> | ||
<sys_metadata>7e9030731b11e1105b76777d8b4bcb19</sys_metadata> | ||
<sys_mod_count>0</sys_mod_count> | ||
<sys_name>CodeSanity - Comment containing "TODO"</sys_name> | ||
<sys_package display_value="CodeSanity WORK IN PROGRESS" source="x_snc_codesanity">8ed42c23dbad0510bcced03cd39619ce</sys_package> | ||
<sys_parent/> | ||
<sys_policy/> | ||
<sys_scope display_value="CodeSanity WORK IN PROGRESS">8ed42c23dbad0510bcced03cd39619ce</sys_scope> | ||
<sys_scope_delete display_value="">8c01c38fa81d4fae9bac60e1bb586744</sys_scope_delete> | ||
<sys_update_name>scan_linter_check_7e9030731b11e1105b76777d8b4bcb19</sys_update_name> | ||
<sys_update_version display_value="scan_linter_check_7e9030731b11e1105b76777d8b4bcb19">8a4b383f1b11e1105b76777d8b4bcb8f</sys_update_version> | ||
<sys_updated_by>admin</sys_updated_by> | ||
<sys_updated_on>2023-03-07 11:23:58</sys_updated_on> | ||
</sys_metadata_delete> | ||
</record_update> |
65 changes: 65 additions & 0 deletions
65
...619ce/author_elective_update/sys_atf_test_suite_test_0ed3d8ae1b7869105b76777d8b4bcbaf.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?xml version="1.0" encoding="UTF-8"?><record_update table="sys_atf_test_suite_test"> | ||
<sys_atf_test_suite_test action="DELETE"> | ||
<abort_on_failure>false</abort_on_failure> | ||
<order/> | ||
<sys_class_name>sys_atf_test_suite_test</sys_class_name> | ||
<sys_created_by>admin</sys_created_by> | ||
<sys_created_on>2023-02-06 14:43:59</sys_created_on> | ||
<sys_id>0ed3d8ae1b7869105b76777d8b4bcbaf</sys_id> | ||
<sys_mod_count>0</sys_mod_count> | ||
<sys_name>44539f02db7069106a03dad1f396199b</sys_name> | ||
<sys_package display_value="CodeSanity WORK IN PROGRESS" source="x_snc_codesanity">8ed42c23dbad0510bcced03cd39619ce</sys_package> | ||
<sys_policy/> | ||
<sys_scope display_value="CodeSanity WORK IN PROGRESS">8ed42c23dbad0510bcced03cd39619ce</sys_scope> | ||
<sys_update_name>sys_atf_test_suite_test_0ed3d8ae1b7869105b76777d8b4bcbaf</sys_update_name> | ||
<sys_updated_by>admin</sys_updated_by> | ||
<sys_updated_on>2023-02-06 14:43:59</sys_updated_on> | ||
<test display_value="DevTools - RedirectToRecord">44539f02db7069106a03dad1f396199b</test> | ||
<test_suite display_value="">302c54251b763810edf3642aab4bcb0d</test_suite> | ||
</sys_atf_test_suite_test> | ||
<sys_update_version action="INSERT_OR_UPDATE"> | ||
<action>DELETE</action> | ||
<application display_value="CodeSanity WORK IN PROGRESS">8ed42c23dbad0510bcced03cd39619ce</application> | ||
<file_path/> | ||
<instance_id>01bfa2ffdb5ecd104d2bac44d496195a</instance_id> | ||
<instance_name>wildgrubetestsandiego</instance_name> | ||
<name>sys_atf_test_suite_test_0ed3d8ae1b7869105b76777d8b4bcbaf</name> | ||
<payload><![CDATA[<?xml version="1.0" encoding="UTF-8"?><record_update table="sys_atf_test_suite_test"><sys_atf_test_suite_test action="INSERT_OR_UPDATE"><abort_on_failure>false</abort_on_failure><order/><sys_class_name>sys_atf_test_suite_test</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2023-02-06 14:43:59</sys_created_on><sys_id>0ed3d8ae1b7869105b76777d8b4bcbaf</sys_id><sys_mod_count>0</sys_mod_count><sys_name>44539f02db7069106a03dad1f396199b</sys_name><sys_package display_value="CodeSanity WORK IN PROGRESS" source="x_snc_codesanity">8ed42c23dbad0510bcced03cd39619ce</sys_package><sys_policy/><sys_scope display_value="CodeSanity WORK IN PROGRESS">8ed42c23dbad0510bcced03cd39619ce</sys_scope><sys_update_name>sys_atf_test_suite_test_0ed3d8ae1b7869105b76777d8b4bcbaf</sys_update_name><sys_updated_by>admin</sys_updated_by><sys_updated_on>2023-02-06 14:43:59</sys_updated_on><test display_value="DevTools - RedirectToRecord">44539f02db7069106a03dad1f396199b</test><test_suite display_value="">302c54251b763810edf3642aab4bcb0d</test_suite></sys_atf_test_suite_test></record_update>]]></payload> | ||
<payload_hash>1639520859</payload_hash> | ||
<record_name>44539f02db7069106a03dad1f396199b</record_name> | ||
<reverted_from/> | ||
<source>e9912a321b0121105b76777d8b4bcb48</source> | ||
<source_table>sys_upgrade_history</source_table> | ||
<state>previous</state> | ||
<sys_created_by/> | ||
<sys_created_on>2023-02-20 05:57:26</sys_created_on> | ||
<sys_id>cdba013a1b5da5105b76777d8b4bcb71</sys_id> | ||
<sys_mod_count/> | ||
<sys_recorded_at>1866d65fd700000000</sys_recorded_at> | ||
<sys_updated_by/> | ||
<sys_updated_on/> | ||
<type>Test Suite Test</type> | ||
<update_guid>8dba013a015da51007f920df0f0f4171</update_guid> | ||
<update_guid_history>8dba013a015da51007f920df0f0f4171:1639520859</update_guid_history> | ||
</sys_update_version> | ||
<sys_metadata_delete action="INSERT_OR_UPDATE"> | ||
<sys_audit_delete/> | ||
<sys_class_name>sys_metadata_delete</sys_class_name> | ||
<sys_created_by>admin</sys_created_by> | ||
<sys_created_on>2023-03-04 09:53:32</sys_created_on> | ||
<sys_db_object display_value="" name="sys_atf_test_suite_test">sys_atf_test_suite_test</sys_db_object> | ||
<sys_id>126b17c8dab047808677f5da628c9000</sys_id> | ||
<sys_metadata>0ed3d8ae1b7869105b76777d8b4bcbaf</sys_metadata> | ||
<sys_mod_count>0</sys_mod_count> | ||
<sys_name>44539f02db7069106a03dad1f396199b</sys_name> | ||
<sys_package display_value="CodeSanity WORK IN PROGRESS" source="x_snc_codesanity">8ed42c23dbad0510bcced03cd39619ce</sys_package> | ||
<sys_parent/> | ||
<sys_policy/> | ||
<sys_scope display_value="CodeSanity WORK IN PROGRESS">8ed42c23dbad0510bcced03cd39619ce</sys_scope> | ||
<sys_scope_delete display_value="">8c01c38fa81d4fae9bac60e1bb586744</sys_scope_delete> | ||
<sys_update_name>sys_atf_test_suite_test_0ed3d8ae1b7869105b76777d8b4bcbaf</sys_update_name> | ||
<sys_update_version display_value="sys_atf_test_suite_test_0ed3d8ae1b7869105b76777d8b4bcbaf">cdba013a1b5da5105b76777d8b4bcb71</sys_update_version> | ||
<sys_updated_by>admin</sys_updated_by> | ||
<sys_updated_on>2023-03-04 09:53:32</sys_updated_on> | ||
</sys_metadata_delete> | ||
</record_update> |
Oops, something went wrong.