FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add Ruby as a possible language by aibaars · Pull Request #513 · github/codeql-action · GitHub

Add Ruby as a possible language - #513

Merged
aibaars merged 5 commits into
mainfrom
aibaars-patch-1
May 26, 2021
Merged

aibaars merged 5 commits into
mainfrom
aibaars-patch-1

Conversation

aibaars commented May 20, 2021
edited
Loading

Copy link
Copy Markdown
Contributor

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

aibaars force-pushed the aibaars-patch-1 branch 5 times, most recently from 6e3fa64 to a387486 Compare May 21, 2021 13:01
aibaars mentioned this pull request May 21, 2021
1 task
aibaars force-pushed the aibaars-patch-1 branch from a387486 to f32c913 Compare May 21, 2021 16:39
aibaars force-pushed the aibaars-patch-1 branch 2 times, most recently from c0b46e3 to 0eaec4f Compare May 23, 2021 14:35
Comment thread src/codeql.ts Outdated
},
}).exec();

return JSON.parse(output);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Catch malformed json errors and rethrow with a meaningful message.

Suggested change
return JSON.parse(output);
try {
return JSON.parse(output);
} catch (e) {
throw new Error("Something meaningful.);
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Wouldn't that suppress the likely interesting error message of e ? In Java I'd write new Error("Unexpected output from codeql resolve languages", e) . What would be the equivalent in Javascript?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think just construct the message as a string. So like new Error("Unexpected output from codeql resolve languages: " + e.message) and maybe some type checks to make sure that e.message exists.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I opted to just write Unexpected output from codeql resolve languages: ${e} . This should include the original error's type and side-steps the problem of a potentially empty message string.

aibaars force-pushed the aibaars-patch-1 branch from 0eaec4f to 4f51b8c Compare May 23, 2021 19:14
aibaars marked this pull request as ready for review May 23, 2021 19:34

aeisenberg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We're populating the changelog now. Since this is a public-facing feature, could you add an entry. And then it's good to merge. Thanks!

aibaars enabled auto-merge May 26, 2021 05:30

aibaars commented May 26, 2021

Copy link
Copy Markdown
Contributor Author

We're populating the changelog now. Since this is a public-facing feature, could you add an entry. And then it's good to merge. Thanks!

There shouldn't be an entry. This is just for internal tests. CodeQL for Ruby is not available yet.

aibaars merged commit 12b2dc6 into main May 26, 2021
aibaars deleted the aibaars-patch-1 branch May 26, 2021 05:40
github-actions Bot mentioned this pull request May 31, 2021
5 tasks
This file contains hidden or 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL