Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion forward_engineering/helpers/columnDefinitionHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

const decorateDefault = (type, defaultValue) => {
const defaultValuesRegExp =
/^(null|current_timestamp(\(\d+\))?)(\s+on\s+update\s+current_timestamp(\(\d+\))?)?$/i;
/^(null|current_timestamp(\(\d+\))?|'[^']*')(\s+on\s+update\s+current_timestamp(\(\d+\))?)?$/i;

Check warning on line 78 in forward_engineering/helpers/columnDefinitionHelper.js

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Simplify this regular expression to reduce its complexity from 22 to the 20 allowed.

See more on https://sonarcloud.io/project/issues?id=hackolade_MySQL&issues=AZ2-eMa4RBAoUMXpbi0O&open=AZ2-eMa4RBAoUMXpbi0O&pullRequest=61
if ((isString(type) || isDateTime(type)) && !defaultValuesRegExp.test(_.trim(defaultValue))) {
return wrap(escapeQuotes(defaultValue));
} else {
Expand Down
Loading