-
Notifications
You must be signed in to change notification settings - Fork 53
@W-7109964@ Static Analyzer CLI plugin #2
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
Conversation
…does nothing exciting, but it exists, which is pretty dope.
…scan or whatever we choose to call it now.
|
Thanks for the contribution! Unfortunately we can't verify the commit author(s): Joshua Feingold <j***@s***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, refresh the status of this Pull Request. |
|
Thanks for the contribution! It looks like @jfeingold35 is an internal user so signing the CLA is not required. However, we need to confirm this. |
1. Resolve eslint plugins using the scanner installation directory 2. Resolve typescript parser using the scanner installation directory 3. Use absolute paths for files to scan. This is necessary since cwd is set to support #2 4. Added default baseConfig to handle common javascript and typescript objects
* Auto-merge from release to dev branch * @W-7434792@: PmdCataloger now includes the source JAR in the properties for rules. * @W-7434792@: The rule deletion is fully added. The messages are placeholders and there are no unit tests. So that will be the next step. * @W-7434792@: Fixed two linting issues. * @W-7434792@: Fixed failing tests. * @W-7434792@: Finished implementing messages, and started writing tests. * @W-7434792@: Got started on tests. Only a few more to go. * @W-7434792@: Implemented last of new tests. * IOC first pass. Single engine, but supports multiple using single ioc.config.ts file. * @W-7434792@: Fixed broken scanner:rule:remove tests. * @W-7434792@: Fixing some compile errors. * @W-7434792@: Refactored a whole bunch of stuff. Will need to rewrite tests, replace placeholder labels, and such. * @W-7434792@: Struggling with test failures that are deeply confusing. * @W-7434792@: Figured out what was wrecking the tests. Do not understand why it was doing that, though. * @W-7434792@: Added examples. * IOC part 2: swapped out Inversify for a lighter weight solution called tsyringe. Lots of changes here, but all just refactoring and cleanup. Added missing types, introduced more interfaces, made async initialization a bit more consistent. The ESLint engine is there, but returning no rules/categories/rulesets. Biggest change was to restructure the catalog json, both the new Catalog.json and the existing PmdCatalog.json. Uses arrays now instead of an object map. * Cleanup after review. * W-7443194: eslint engine support; lots of related refactoring; additional test project fixtures. * W-7443194: fix and improve target file handling across engines * W-7443194: fix failing run.test.ts and some of the easier changes after initial code review * W-7443194: More cleanup after code review, almost done. Also fixed unpackaged-sanity in config.yml * W-7443194: Final round of cleanup after code review for this PR * W-7443194: Phase 2 of multi-engine story. Collection of fixes and better support for tsconfig. * W-7443194: Minor cleanup * W-7443194: Fix and add some multi-engine-run tests * W-7443194: Tweaks after code review * W-7443194: support target file as arg, making --target optional * W-7443194: rename code-samples to code-fixtures and move test/projects under code-fixtures * @W-7559673@ Git2Gus config changes on dev branch * Fixing lint failures from older changes to unblock this PR * Update README.md * Update the readme * Update packages * Update README.md * Update README.md * Basic Structure for Sfdx Scanner Doc site * adding _site and jekyll cache to .gitignore * Doc site updates with install and command references + update CLI plugin help text @W-7478172@ @W-7396965@ * Bump websocket-extensions from 0.1.3 to 0.1.4 Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4. - [Release notes](https://github.com/faye/websocket-extensions-node/releases) - [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md) - [Commits](faye/websocket-extensions-node@0.1.3...0.1.4) Signed-off-by: dependabot[bot] <support@github.com> * More docs and demo gifs @ * @W-7660921@: Converted relative paths to absolute paths, so those will work now. * Fixing some grammer and also adding a line for PMD version during compilation. @W-7396965@ * Adding a logo and some small formatting of the header @W-7396965@ * @W-7687751@: ESLint results are only reported if they are actually meaningful. * @W-7660937@: --json flag now results in meaningful output. * @W-7660937@: Fixed an issue with the table output. * @W-7660937@: Fixed failing test. * Breaking down eslint into JS and TS - draft * @W-7660937@: Added tests for --json flag and json format. * Minor changes and renames * Added helpful FAQ. * Small formatting changes for FAQs * changes to links * Update architecture.md * Update faq.md * Update index.md * Update troubleshooting.md * Update install.md * Update prerequisites.md * Prevent users from adding colliding paths Categories and rulesets are indexed by relative paths that are looked up on the classpath. Prevent users from adding colliding paths which would lead to confusing behavior since the first one found on the classpath is the one that would be run by PMD. Added the ability to add an XML file from the filesystem. * Comment cleanup * Specify collision jars explicitly Specify the jars in a specific order to ensure that the error message is predictable and not determined by the order of directory traversal. * Review feedback Fixed error message Added java doc Fixed log message * Update install.md * Remove link to non-existent MD file * fix link to image * Remove TOC IMHO, TOCs are too hard to create, and even worse to maintain, in Markdown. People can search the page for stuff they're interested in. * wrapping up to a logical conclusion so that remaining portions can be broken down into work items * Update manage.md * Update author.md * Update faq.md * Update index.md * Update add.md * Update describe.md * Update list.md * Update add.md * Update remove.md * Update run.md * Addressing code review comments * Temporarily renaming EslintEngine to unblock test failures * Naming back to EslintEngine * @W-7716156@: Added language manager. Next is to add test. * @W-7716156@: Added test. * @W-7716156@: Added aliasing and new tests. * @W-7716156@: Updated FAQ to cover new steps. * Update architecture.md * Update manage.md * Update install.md * Update add.md * Update describe.md * Update describe.md * Update list.md * Update remove.md * Update run.md * Update index.md * @W-7716156@: refactored code, trying to fix test. * taking out the link for one of the questions * @W-7716156@: Rewrote tests. * Use a temporary file to pass files to PMD Write the file paths to a temporary file and pass the path fo the temporary file to PMD. This avoids E2BIG errors if the scan contains so many files that the command line becomes too long. * Removed unnecessary await * Use async io when creating the temp file * Small changes to docs * Automatically clean up the temporary file Inform tmp to clean up the temp file automatically. The method now returns the path as a string. * @W-7661099@: Added a few more lines of logging. * Add Triggers to PMD glob list PMD can analyze Apex triggers. Include them by default in the list supported globs. * Strip comments from tsconfig.json before parsing Generated tsconfig.json files have C style comments in them. Remove these before parsing the object. * @W-7740890@: All custom paths for PMD are cataloged even if the default JAR for that language is off. * More unit tests for BaseEslintEngine * @W-7740890@: Changed a let to a const. Should fix tests. * @W-7740890@: Added tests. * ESLint changes 1. Resolve eslint plugins using the scanner installation directory 2. Resolve typescript parser using the scanner installation directory 3. Use absolute paths for files to scan. This is necessary since cwd is set to support #2 4. Added default baseConfig to handle common javascript and typescript objects * Added tests for baseConfig.env * Remove Javascript from list of PMD languages This is a temporary workaround to avoid an issue with Java OOM error when scanning javascript files in PMD. More information can be found here pmd/pmd#2081. Updated unit tests to account for the changes in default engines. * Changes to Config.ts to protect against bad config values * Minor fix to Config.test.ts * test fix after merge * Prevent use of javascript PMD rules Throw an error if the PMD engine would run javascript rules. This is accomplished by preventing 'javascript' from appearing in the PMD engine's supportedLanguages array. No enforcment is done of the PMD engine's targePatterns array, removing the value from the supportedLanguages array is enough enforcement to preven the user from encountering the OOM bug. * Fixed typo * Review feedback Change LANGUAGES to LANGUAGE enum Move logic to PmdLanguageManger * First part of tsconfig changes Attempt to find the tsconfig.json file in the current working directory, throw an error if it can't be found * Adding documentation about category inconsistency * Second part to tsconfig changes Allow the user to specify a location of tsconfig.json using a command line flag. Throw an error if a tsconfig.json is found in the current working directory and the --tsconfig flag is specified. This error is thrown even if they are the same file. Attempted to strike a balance of leaking the CLI into the engines. The engines should be usable from other callers other than the CLI, but the validation occurs in the engine itself and the user needs to know how to fix errors. For now, specify the command line flag using the same name as the key in the Engine Options. RuleEngine takes a map of options. Currently only the Typescript engine accepts or uses these options. * Clarify tests and docs Simplified the invalid-ts project Added comments to methods * Cleanup lint errors * Update Readme.md with changes to the order and also a link to the git page * Confirming that a language has an assoctiated path before adding it as a java parameter * Updated documentation for --tsconfig flag * Fixing config inconsistencies * Filter PMD results before processing violations The PMD Java program returns file violations as well as other top level information. We only want to show information about file violations. Filter the results to only include nodes where the name is 'file'. Log all other nodes. * Give precedence to --tsconfig flag over cwd The previous implementation would thrown an error if a tsconfig.json file was found in the current working directory and the --tsconfig flag was specified on the command line. Allow this situation, giving precedence to the value provided to --tsconfig. * Cleanup assignment for readability * Filter out invalid catalog files Handle situations where the json catalogs are out of sync with the file system because the referenced file no longer exists. Skip the file and show the user a warning. * Code style cleanup Removed unnecessary temp variable. * Changes based on review Changed error message Restore unit tests that shouldn't use constants Use .entries() to iterate over map contents * @W-7791882@: Added a --env parameter for overriding ESLint env vars. * @W-7791882@: Fixed a few linting problems. * @W-7791882@: Added test for fix. * Add eslint out of memory troubleshooter Adds an entry for an out of memory error that can occur when scanning large projects. * Remove parameter that isn't relevant to problem * @W-7791882@: Refactored the solution to be a bit cleaner, softened the language in the comments. * @W-7791882@: Minor stylistic changes. * Add more defaults to DEFAULT_ENV_VARS added jasmine, jest, jquery, and mocha to reduce scanning noise. * Minor comment tweak * Update to add Google Tag Manager for analytics * Incrementing version to 2.0.0. * Fixing error in packaged-sanity command. Co-authored-by: Mike Hoefer <mhoefer@salesforce.com> Co-authored-by: Joshua Feingold <jfeingold@salesforce.com> Co-authored-by: Roopa Mohan <roopidevs@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: rmohan20 <58573547+rmohan20@users.noreply.github.com> Co-authored-by: Joshua Feingold <jfeingold35@gmail.com> Co-authored-by: Juliet Shackell <63259011+jshackell-sfdc@users.noreply.github.com> Co-authored-by: Jeff Bartolotta <jbartolotta@salesforce.com>
@W-8988388@: Integrating TinkerPop trial engine.
FIX: @W-17291574@: Fix workflow to apply tag manually (attempt #2)
No description provided.