Skip to content

Commit 9fccd71

Browse files
committed
Add SEI CERT C++ table filter
1 parent 49108bb commit 9fccd71

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/scripts/custom.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ const createDataTable = async () => {
7777
{ 'label': 'CWE', 'searchValue': 'cwe' },
7878
{ 'label': 'ISO/IEC 24772-8', 'searchValue': 'iso' },
7979
{ 'label': 'SEI CERT C', 'searchValue': 'sei' },
80+
{ 'label': 'SEI CERT C++', 'searchValue': 'sei-cpp' },
8081
].map(({ label, searchValue }) => ({
8182
'text': label,
8283
'attr': {
@@ -90,8 +91,9 @@ const createDataTable = async () => {
9091
// CWE), show only rows where the corresponding column is
9192
// non-empty. Otherwise, filter by category using an exact match
9293
// in column 2
93-
if (['cwe', 'iso', 'sei'].includes(searchValue)) {
94-
let columnIdx = {'cwe': 3, 'iso': 4, 'sei': 5}[searchValue];
94+
if (['cwe', 'iso', 'sei', 'sei-cpp'].includes(searchValue)) {
95+
let columnIdx =
96+
{ 'cwe': 3, 'iso': 4, 'sei': 5, 'sei-cpp': 6 }[searchValue];
9597
dataTable.column(columnIdx).search(
9698
'^(?!\\s*$).+', /* regex = */true, /* smart = */ false);
9799
} else {

0 commit comments

Comments
 (0)