We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Quick write up about using Salesforce code analyzer to scan only the files changed in a given commit
// lint-staged.config.js module.exports = { "**/*.cls": (filenames) => `sf scanner run -f table -s 3 -t ${filenames.join(", ")}` };
// package.json { "lint-staged": { "**/*.{cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}": [ "prettier --write" ], "**/{aura,lwc}/**": [ "eslint" ], "**/*.cls" : [ "prettier --write" ] } }
// ContactHelper.cls public with sharing class ContactHelper { public ContactHelper() { } public static doY() { // if (!Schema.sObjectType.Opportunity.fields.Amount.isCreateable()){ // ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, // 'Error: Insufficient Access')); // return null; // } Contact c = new Contact(); // specify other fields c.Title = 'Poo Bah'; database.insert(c); } }
<!-- ContactHelper.cls-meta.xml --> <?xml version="1.0" encoding="UTF-8" ?> <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> <apiVersion>58.0</apiVersion> <status>Active</status> </ApexClass>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Quick write up about using Salesforce code analyzer to scan only the files changed in a given commit
The text was updated successfully, but these errors were encountered: