Skip to content
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

Develop #23

Merged
merged 31 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
68b52e4
meu commit
fschiozerSFDC Jan 23, 2024
74943ab
Merge pull request #15 from fabioschiozer/feature-a1
fschiozerSFDC Jan 23, 2024
85e364e
Update buildfile.json
fschiozerSFDC Jan 23, 2024
985e22d
bulidao
fschiozerSFDC Jan 23, 2024
1404906
mais um
fschiozerSFDC Jan 23, 2024
0733066
Create codeAnalyzerOnPR.yml
fschiozerSFDC May 16, 2024
849a41b
Update DummyClass.cls
fschiozerSFDC May 16, 2024
d969a34
Update codeAnalyzerOnPR.yml
fschiozerSFDC May 16, 2024
7526ada
Update codeAnalyzerOnPR.yml
fschiozerSFDC May 16, 2024
6510172
Update codeAnalyzerOnPR.yml
fschiozerSFDC May 16, 2024
d198ae1
Update codeAnalyzerOnPR.yml
fschiozerSFDC May 16, 2024
6fc991d
Update codeAnalyzerOnPR.yml
fschiozerSFDC May 16, 2024
14eafee
Update codeAnalyzerOnPR.yml
fschiozerSFDC May 16, 2024
59619f0
Update DummyClass.cls
fschiozerSFDC May 16, 2024
5de96db
Update codeAnalyzerOnPR.yml
fschiozerSFDC May 16, 2024
b7e3383
Update codeAnalyzerOnPR.yml
fschiozerSFDC May 16, 2024
fa28c3a
Update codeAnalyzerOnPR.yml
fschiozerSFDC May 16, 2024
72f2209
Update codeAnalyzerOnPR.yml
fschiozerSFDC May 16, 2024
ce34d05
Update codeAnalyzerOnPR.yml
fschiozerSFDC May 16, 2024
254aba4
Merge pull request #17 from fabioschiozer/fabioschiozer-patch-1
schiozer May 16, 2024
a704a1f
Update DummyClass.cls
schiozer May 16, 2024
c0f25c5
Merge pull request #18 from fabioschiozer/schiozer-patch-1
schiozer May 16, 2024
23f239d
Update codeAnalyzerOnPR.yml
fschiozerSFDC May 16, 2024
f2b30f7
Merge pull request #16 from fabioschiozer/feature-a1
fschiozerSFDC May 22, 2024
c9b3050
teste
fschiozerSFDC May 22, 2024
2e583cc
Merge branch 'develop' into fabioschiozer-patch-1
fschiozerSFDC May 22, 2024
f3e7b34
Update DummyClassTest.cls
fschiozerSFDC May 22, 2024
ede01ba
Merge pull request #20 from fabioschiozer/fabioschiozer-patch-1
fschiozerSFDC May 22, 2024
9b11c1d
Update DummyClass.cls
fschiozerSFDC May 22, 2024
db7bff5
Merge pull request #22 from fabioschiozer/fabioschiozer-patch-1
fschiozerSFDC May 22, 2024
2f58429
Merge branch 'main' into develop
fschiozerSFDC May 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/codeAnalyzerOnPR.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Salesforce Code Analyzer on PR

name: Salesforce Code Analyzer - on pull request

on:
pull_request:
Expand All @@ -8,7 +9,6 @@ on:
jobs:
salesforce-code-analyzer-workflow:
runs-on: ubuntu-latest

steps:
- name: Check out files
uses: actions/checkout@v4
Expand All @@ -19,17 +19,21 @@ jobs:
- name: Install Salesforce Code Analyzer Plugin
run: sf plugins install @salesforce/sfdx-scanner@latest

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44

- name: Run Salesforce Code Analyzer
id: run-code-analyzer
uses: forcedotcom/run-code-analyzer@v1
with:
run-command: run
run-arguments: --normalize-severity --target . --outfile results.html
run-arguments: --normalize-severity --target ${{ steps.changed-files.outputs.all_changed_files }} --outfile results.html
results-artifact-name: salesforce-code-analyzer-results

- name: Check the outputs to determine whether to fail
if: |
steps.run-code-analyzer.outputs.exit-code > 0 ||
steps.run-code-analyzer.outputs.num-sev1-violations > 0 ||
steps.run-code-analyzer.outputs.num-violations > 10
steps.run-code-analyzer.outputs.num-violations > 0
run: exit 1
12 changes: 12 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";


export default [
{languageOptions: { globals: globals.browser }},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReactConfig,
];
6 changes: 2 additions & 4 deletions force-app/main/default/classes/DummyClass.cls
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
public with sharing class DummyClass {

public DummyClass() {

}

public static String getStatic(){
String a = 'DOIS RETORNOS';

String a = 'Analiza o código';

return a;
}
Expand Down
35 changes: 35 additions & 0 deletions force-app/main/default/classes/DummyClassTest.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* This class contains unit tests for validating the behavior of Apex classes
* and triggers.
*
* Unit tests are class methods that verify whether a particular piece
* of code is working properly. Unit test methods take no arguments,
* commit no data to the database, and are flagged with the testMethod
* keyword in the method definition.
*
* All test methods in an org are executed whenever Apex code is deployed
* to a production org to confirm correctness, ensure code
* coverage, and prevent regressions. All Apex classes are
* required to have at least 75% code coverage in order to be deployed
* to a production org. In addition, all triggers must have some code coverage.
*
* The @isTest class annotation indicates this class only contains test
* methods. Classes defined with the @isTest annotation do not count against
* the org size limit for all Apex scripts.
*
* See the Apex Language Reference for more information about Testing and Code Coverage.
*/
@isTest
private class DummyClassTest {

@isTest
static void myUnitTest() {
// TO DO: implement unit test

String a = DummyClass.getStatic();

System.Assert(a == 'Analiza o código', 'Test failed !!!');


}
}
5 changes: 5 additions & 0 deletions force-app/main/default/classes/DummyClassTest.cls-meta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>59.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
<actionOverrides>
<actionName>Accept</actionName>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Accept</actionName>
<formFactor>Large</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Accept</actionName>
<formFactor>Small</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>CancelEdit</actionName>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>CancelEdit</actionName>
<formFactor>Large</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>CancelEdit</actionName>
<formFactor>Small</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Clone</actionName>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Clone</actionName>
<formFactor>Large</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Clone</actionName>
<formFactor>Small</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Delete</actionName>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Delete</actionName>
<formFactor>Large</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Delete</actionName>
<formFactor>Small</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Edit</actionName>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Edit</actionName>
<formFactor>Large</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Edit</actionName>
<formFactor>Small</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>List</actionName>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>List</actionName>
<formFactor>Large</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>List</actionName>
<formFactor>Small</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>New</actionName>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>New</actionName>
<formFactor>Large</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>New</actionName>
<formFactor>Small</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>SaveEdit</actionName>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>SaveEdit</actionName>
<formFactor>Large</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>SaveEdit</actionName>
<formFactor>Small</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Tab</actionName>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Tab</actionName>
<formFactor>Large</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Tab</actionName>
<formFactor>Small</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>View</actionName>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>View</actionName>
<formFactor>Large</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>View</actionName>
<formFactor>Small</formFactor>
<type>Default</type>
</actionOverrides>
<allowInChatterGroups>false</allowInChatterGroups>
<compactLayoutAssignment>SYSTEM</compactLayoutAssignment>
<deploymentStatus>Deployed</deploymentStatus>
<enableActivities>false</enableActivities>
<enableBulkApi>true</enableBulkApi>
<enableFeeds>false</enableFeeds>
<enableHistory>true</enableHistory>
<enableLicensing>false</enableLicensing>
<enableReports>true</enableReports>
<enableSearch>true</enableSearch>
<enableSharing>true</enableSharing>
<enableStreamingApi>true</enableStreamingApi>
<externalSharingModel>Private</externalSharingModel>
<label>Eu vou ser deletado</label>
<nameField>
<label>Eu vou ser deletado Name</label>
<trackHistory>false</trackHistory>
<type>Text</type>
</nameField>
<pluralLabel>Nós vamos ser deletados</pluralLabel>
<searchLayouts></searchLayouts>
<sharingModel>ReadWrite</sharingModel>
<visibility>Public</visibility>
</CustomObject>
4 changes: 4 additions & 0 deletions log.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
7526ada,Fabio de Agostini Schiozer,2 hours ago,Update codeAnalyzerOnPR.yml
d969a34,Fabio de Agostini Schiozer,3 hours ago,Update codeAnalyzerOnPR.yml
849a41b,Fabio de Agostini Schiozer,3 hours ago,Update DummyClass.cls
0733066,Fabio de Agostini Schiozer,3 hours ago,Create codeAnalyzerOnPR.yml
4 changes: 2 additions & 2 deletions manifest/buildfile.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"type": "metadata",
"manifestFile": "manifest/package.xml",
"testLevel": "RunLocalTests",
"testLevel": "RunSpecifiedTests",
"classPath": "force-app/main/default/classes",
"timeout": "33",
"ignoreWarnings": true
Expand All @@ -17,4 +17,4 @@
"command": "sf --version"
}
]
}
}
7 changes: 6 additions & 1 deletion manifest/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>DummyClass</members>
<members>DummyClassTest</members>
<name>ApexClass</name>
</types>
<version>58.0</version>
<types>
<members>Eu_vou_ser_deletado__c</members>
<name>CustomObject</name>
</types>
<version>60.0</version>
</Package>
7 changes: 7 additions & 0 deletions manifest/postDestructive/destructiveChanges.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Eu_vou_ser_deletado__c</members>
<name>CustomObject</name>
</types>
</Package>
4 changes: 4 additions & 0 deletions manifest/postDestructive/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<version>60.0</version>
</Package>
Loading
Loading