Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: reduce code issues #8639

Merged
merged 11 commits into from
Feb 11, 2021
Merged

fix: reduce code issues #8639

merged 11 commits into from
Feb 11, 2021

Conversation

viceice
Copy link
Member

@viceice viceice commented Feb 11, 2021

Changes:

Fix some codeql isues:

  • gradle-lite: greedy regex

Context:

Fixes CodeQL errors

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added unit tests, or
  • No new tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@viceice viceice changed the title fix(gradle-lite): reduce regex greedyness fix: reduce code issues Feb 11, 2021
@viceice viceice dismissed a stale review via 0a093dd February 11, 2021 08:15
@viceice viceice marked this pull request as ready for review February 11, 2021 08:57
@viceice viceice requested a review from rarkins February 11, 2021 08:57
Comment on lines -30 to -40
COPY --from=image9

COPY\
--chown=root \
# comment1
#
#comment2
--from=image10
# comment2
path1 path2

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid docker syntax

Comment on lines -92 to -109
Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"currentDigest": undefined,
"currentValue": undefined,
"datasource": "docker",
"depName": "image9",
"depType": "stage",
"replaceString": "image9",
},
Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"currentDigest": undefined,
"currentValue": undefined,
"datasource": "docker",
"depName": "image10",
"depType": "stage",
"replaceString": "image10",
},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From invalid docker syntax

Comment on lines -5 to +10
'lib/manager/dockerfile/__fixtures__/Dockerfile1',
'lib/manager/dockerfile/__fixtures__/1.Dockerfile',
'utf8'
);

const d2 = readFileSync(
'lib/manager/dockerfile/__fixtures__/Dockerfile2',
'lib/manager/dockerfile/__fixtures__/2.Dockerfile',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For syntax highlighting in vscode 😉

@@ -10,7 +10,7 @@ import {
} from './common';

const artifactRegex = regEx(
'^[a-zA-Z][-_a-zA-Z0-9]*(?:.[a-zA-Z0-9][-_a-zA-Z0-9]*)*$'
'^[a-zA-Z][-_a-zA-Z0-9]*(?:\\.[a-zA-Z0-9][-_a-zA-Z0-9]*?)*$'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only match dot

@rarkins rarkins merged commit 6cc2e50 into master Feb 11, 2021
@rarkins rarkins deleted the fix/code-issues branch February 11, 2021 09:29
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 24.46.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants