-
Notifications
You must be signed in to change notification settings - Fork 53
CHANGE(chore): @W-18505636@ Updates for forcedotcom/code-analyzer name change #1817
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
| attributes: | ||
| label: Bug Description | ||
| description: Provide a clear and concise description of what the bug is and include the exact command that you ran. | ||
| description: Provide a clear and concise description of what the bug is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exact command is asked for later, so thought this could be shortened
package.json
Outdated
| { | ||
| "name": "@salesforce/plugin-code-analyzer", | ||
| "description": "Static code scanner that applies quality and security rules to Apex code, and provides feedback.", | ||
| "description": "Static code scanner that applies quality and security rules to Salesforce code and provides feedback.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we scan more than just Apex, I wanted to open up this description. However, I wasn't sure we'd be ok locking so closely to Salesforce since code-analyzer is not entirely platform specific. Happy to update this as we need! Maybe @jshackell-sfdc can weigh in here as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I agree with your change. I would go even further and remove the word "Static" even.
Let's see if @jshackell-sfdc doesn't already have a better short description that we could put here instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I liked the notion of matching what we have in the readme as well, so I made these match!
ce27483 to
905b0fc
Compare
| @@ -1,7 +1,6 @@ | |||
| name: Report a Bug with a scanner command (v4) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you updated the 0-code_analyzer_bug.yml to have
name: Report a Bug with the sf CLI `code-analyzer` commands
then shouldn't this 1_scanner_bug.yml be something like:
name: Report a Bug with the sf CLI `scanner` (v4) commands
| @@ -0,0 +1,142 @@ | |||
| name: Report a Bug with the Salesforce Code Analyzer VS Code Extension | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add some quotes like maybe:
name: Report a Bug with the "Salesforce Code Analyzer" VS Code Extension
| @@ -0,0 +1,122 @@ | |||
| name: Report a Bug with the Run Salesforce Code Analyzer Github Action | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto about quotes... maybe:
name Report a Bug with the "Run Salesforce Code Analyzer" GitHub Action
Also note that GitHub should have a capital H.
| label: Scanner Plugin Version | ||
| description: | | ||
| If you are using V4, what do you get from typing the command "sf plugins" in the terminal? | ||
| placeholder: | | ||
| Example: @salesforce/sfdx-scanner/4.10.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's assume that folks have moved to v5 and instead let's just ask about their code-analyzer version just like we do on the code-analyzer cli issue page and all its requirements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this one, I was thinking it would likely be part of the troubleshooting steps of "are you using v4", because if they are, we would direct them to using v5 and hopefully resolve the issue 🤞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand.. but where is the code-analyzer version when they are using code-analyzer and not scanner?
README.md
Outdated
| * how to install Code Analyzer | ||
| * what is included in the Code Analyzer command reference | ||
| * the structure of Code Analyzer architecture | ||
| * what rules are included from code-scanning engines such as PMD and ESLint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need the word "code-scanning" here. It isn't a term we normally use. So let's just say "... from engines ..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed "code-scanning felt funky - I was looking for something that might help explain what an "engine" means for someone who hasn't worked with Code Analyzer before. I'll take another stab at this one and ask @jshackell-sfdc!
package.json
Outdated
| { | ||
| "name": "@salesforce/plugin-code-analyzer", | ||
| "description": "Static code scanner that applies quality and security rules to Apex code, and provides feedback.", | ||
| "description": "Static code scanner that applies quality and security rules to Salesforce code and provides feedback.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I agree with your change. I would go even further and remove the word "Static" even.
Let's see if @jshackell-sfdc doesn't already have a better short description that we could put here instead.
89f4d84 to
5378b48
Compare
5378b48 to
64220e8
Compare
| label: Have you tried to resolve this issue yourself first? | ||
| description: | | ||
| Oftentimes, you can resolve `code-analyzer` issues on your own. Follow these steps: | ||
| You can often resolve "code-analyzer" issues on your own. Follow these steps: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm wrong here but I think we actually do want the ticks so "code-analyzer" renders as code?
| attributes: | ||
| label: Steps To Reproduce | ||
| description: List out the steps that you used to reproduce the bug behavior. Be as specific and clear as possible. | ||
| description: List the steps that you used to reproduce the bug behavior. Be as specific and clear as possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably also instruct them to make sure that the STRs are runnable on another machine. E.g., attach any files that might be necessary for us to scan against to reproduce the problem, etc.
It's irksome when they just give the steps they do on their local machine without any way for us to recreate their setup.
| attributes: | ||
| label: Steps To Reproduce | ||
| description: List out the steps that you used to reproduce the bug behavior. Be as specific and clear as possible. | ||
| description: List the steps that you used to reproduce the bug behavior. Be as specific and clear as possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as other file.
| attributes: | ||
| label: Have you tried to resolve this issue yourself first? | ||
| description: | | ||
| You can often resolve "vscode-extension" issues on your own. Follow these steps: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"vscode-extension" feels wrong, but I'm not intuitively sure what should go here. Should it be the name of the actual pacakge the VSCode extension is released as, maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll go with a generic! that's what I did for the gha
| 1. Read the error message. | ||
| 2. Read the [Salesforce Code Analyzer VS Code Extension](https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/analyze-vscode.html) documentation. | ||
| 3. Double-check the VS Code extension feature you used. Make sure that items like file names, method names, and category names are correctly spelled and cased. | ||
| 4. Verify that you can't reproduce the issue using the appropriate Salesforce CLI command directly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll want to include instructions for how they can set the logger to include the actual command that was run, right? (i.e., turning the debug settings to DEBUG, etc?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jfeingold35 can you add a suggestion for how to phrase this? I can remember how to update that setting (and haven't used it with other extensions before).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the "Developer: Set Log Level" command from the Command Palette to set the log levels to 'DEBUG', and then the "Output" panel will indicate what the underlying code-analyzer command for the given VSCode command was.
| - type: textarea | ||
| attributes: | ||
| label: Steps To Reproduce | ||
| description: List the steps that you used to reproduce the bug behavior. Be as specific and clear as possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as elsewhere.
| - type: textarea | ||
| attributes: | ||
| label: Steps To Reproduce | ||
| description: List the steps that you used to reproduce the bug behavior. Be as specific and clear as possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment elsewhere.
| - type: dropdown | ||
| attributes: | ||
| label: Code Analyzer Version | ||
| description: "Are you using Code Analyzer v4? (Is the setting 'Code Analyzer: Use v4 (Deprecated)' checked?)" | ||
| options: | ||
| - "Yes" | ||
| - "No" | ||
| - "Not sure" | ||
| default: 0 | ||
| validations: | ||
| required: true | ||
| - type: input | ||
| attributes: | ||
| label: Scanner Plugin Version | ||
| description: | | ||
| If you are using Code Analyzer v4, what do you get when you run the "sf plugins" command in the terminal? | ||
| placeholder: | | ||
| Example: @salesforce/sfdx-scanner 4.12.0 (4.12.0) | ||
| validations: | ||
| required: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you have "Code Analyzer Version" but the question is about v4 use or not. We need to actually get the Code Analyzer Version from the user and relabel the drop down about v4 use or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, let me clarify this section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated this - hopefully this reads better now!
| @@ -1,38 +1,37 @@ | |||
| name: Report a Bug with a code-analyzer command | |||
| description: Report an issue with a code-analyzer command. | |||
| name: Report a Bug With the "code-analyzer" (v5) CLI Commands | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you double check with @jshackell-sfdc on whether the word "with" should be capitalized here. I thought it fit into the same category as the words "a" and "the".
If not, then we should update all of our issues files to not capitalize "with".
| @@ -0,0 +1,123 @@ | |||
| name: Report a Bug with the "Run Salesforce Code Analyzer" GitHub Action | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this has a lower case "with" - which I like. So we should make them all consistent.
This PR: