Add max line length of 120 to linter (#1524)

This commit is contained in:
Angela P Wen 2023-02-07 06:09:33 -08:00 committed by GitHub
parent 9ab6aa64a0
commit 81644f35ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 24 additions and 11 deletions

View file

@ -33,6 +33,12 @@
"alphabetize": {"order": "asc"},
"newlines-between": "always"
}],
"max-len": ["error", {
"code": 120,
"ignoreUrls": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true
}],
"no-async-foreach/no-async-foreach": "error",
"no-console": "off",
"no-sequences": "error",

3
lib/config-utils.js generated
View file

@ -905,7 +905,8 @@ exports.parsePacks = parsePacks;
* Without a '+', an input value will override the corresponding value in the config file.
*
* @param inputValue The input value to process.
* @returns true if the input value should replace the corresponding value in the config file, false if it should be appended.
* @returns true if the input value should replace the corresponding value in the config file,
* false if it should be appended.
*/
function shouldCombine(inputValue) {
return !!inputValue?.trim().startsWith("+");

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

3
lib/upload-lib.js generated
View file

@ -293,7 +293,8 @@ async function waitForProcessing(repositoryNwo, sarifID, logger, options = {
if (Date.now() >
statusCheckingStarted + STATUS_CHECK_TIMEOUT_MILLISECONDS) {
// If the analysis hasn't finished processing in the allotted time, we continue anyway rather than failing.
// It's possible the analysis will eventually finish processing, but it's not worth spending more Actions time waiting.
// It's possible the analysis will eventually finish processing, but it's not worth spending more
// Actions time waiting.
logger.warning("Timed out waiting for analysis to finish processing. Continuing.");
break;
}

File diff suppressed because one or more lines are too long

3
lib/util.js generated
View file

@ -691,7 +691,8 @@ exports.isHostedRunner = isHostedRunner;
* @param languagesInput Languages input from the workflow
* @param repository The owner/name of the repository
* @param logger A logger
* @returns A boolean indicating whether or not the toolcache should be bypassed and the latest codeql should be downloaded.
* @returns A boolean indicating whether or not the toolcache should be bypassed
* and the latest codeql should be downloaded.
*/
async function shouldBypassToolcache(featuresEnablement, codeqlUrl, languagesInput, repository, logger) {
// An explicit codeql url is specified, that means the toolcache will not be used.

File diff suppressed because one or more lines are too long

View file

@ -1650,7 +1650,8 @@ export function parsePacks(
* Without a '+', an input value will override the corresponding value in the config file.
*
* @param inputValue The input value to process.
* @returns true if the input value should replace the corresponding value in the config file, false if it should be appended.
* @returns true if the input value should replace the corresponding value in the config file,
* false if it should be appended.
*/
function shouldCombine(inputValue?: string): boolean {
return !!inputValue?.trim().startsWith("+");

View file

@ -87,7 +87,8 @@ interface InitWithConfigStatusReport extends InitStatusReport {
interface InitToolsDownloadFields {
/** Time taken to download the bundle, in milliseconds. */
tools_download_duration_ms?: number;
/** Whether the relevant tools dotcom feature flags have been misconfigured. Only populated if we attempt to determine the default version based on the dotcom feature flags. */
/** Whether the relevant tools dotcom feature flags have been misconfigured.
* Only populated if we attempt to determine the default version based on the dotcom feature flags. */
tools_feature_flags_valid?: boolean;
}

View file

@ -416,7 +416,8 @@ export async function waitForProcessing(
statusCheckingStarted + STATUS_CHECK_TIMEOUT_MILLISECONDS
) {
// If the analysis hasn't finished processing in the allotted time, we continue anyway rather than failing.
// It's possible the analysis will eventually finish processing, but it's not worth spending more Actions time waiting.
// It's possible the analysis will eventually finish processing, but it's not worth spending more
// Actions time waiting.
logger.warning(
"Timed out waiting for analysis to finish processing. Continuing."
);

View file

@ -808,7 +808,8 @@ export function isHostedRunner() {
* @param languagesInput Languages input from the workflow
* @param repository The owner/name of the repository
* @param logger A logger
* @returns A boolean indicating whether or not the toolcache should be bypassed and the latest codeql should be downloaded.
* @returns A boolean indicating whether or not the toolcache should be bypassed
* and the latest codeql should be downloaded.
*/
export async function shouldBypassToolcache(
featuresEnablement: FeatureEnablement,