Skip to content

Commit

Permalink
HCK-7072: fix sonar issues (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
serhii-filonenko authored Jul 12, 2024
1 parent 2e1e516 commit aa146fb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion forward_engineering/helpers/commentIfDeactivated.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const BEFORE_DEACTIVATED_STATEMENT = '-- ';
const REG_FOR_MULTYLINE_COMMENT = /(\n\/\*\n[\s\S]*?\n\s\*\/\n)|(\n\/\*\n[\s\S]*?\n\s\*\/)$/gi;
const REG_FOR_MULTYLINE_COMMENT = /(\n\/\*\n[\s\S]*?\n\s\*\/\n)$|(\n\/\*\n[\s\S]*?\n\s\*\/)$/gi;

const commentIfDeactivated = (statement, data, isPartOfLine) => {
if (data?.hasOwnProperty('isActivated') && !data.isActivated) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const reorderTableRows = (tableRows, isFieldOrderAlphabetic) => {
return tableRows;
}

const reorderedFieldNames = Object.keys(tableRows[0]).sort();
const reorderedFieldNames = Object.keys(tableRows[0]).sort((a, b) => a?.localeCompare?.(b));
return tableRows.map(row =>
Object.values(row).reduce(
(columns, columnValue, i) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const handleDefault = (typeObject, value) => {
const validValue =
{
numeric: Number(value.replace(/(^\(\()|(\)\)$)/g, '')),
char: value.replace(/(^\(\')|(\'\))$/g, ''),
xml: value.replace(/(^\(N\')|(\'\))$/g, ''),
char: value.replace(/(^\(')$|('\))$/g, ''),
xml: value.replace(/(^\(N')$|('\))$/g, ''),
}[typeObject.type] || value;

return { default: validValue };
Expand Down

0 comments on commit aa146fb

Please sign in to comment.