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

Test 4 #14

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions force-app/main/default/objects/Log__e/Log__e.object-meta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
<deploymentStatus>Deployed</deploymentStatus>
<eventType>HighVolume</eventType>
<label>Log</label>
<pluralLabel>Logs</pluralLabel>
<publishBehavior>PublishImmediately</publishBehavior>
</CustomObject>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>

Check failure

Code scanning / sf-metadata-linter

Fields must have descriptions Error

Field is missing a description
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Data__c</fullName>

Check failure

Code scanning / sf-metadata-linter

Fields must have descriptions Error

Field is missing a description
<externalId>false</externalId>

Check failure

Code scanning / sf-metadata-linter

Fields must have descriptions Error

Field is missing a description
<isFilteringDisabled>false</isFilteringDisabled>
<isNameField>false</isNameField>
<isSortingDisabled>false</isSortingDisabled>
<label>Data</label>
<length>131072</length>
<type>LongTextArea</type>
<visibleLines>3</visibleLines>
</CustomField>
7 changes: 4 additions & 3 deletions src/commands/metalint/run.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { pathToFileURL } from 'node:url';
// import * as path from 'node:path';
// import { pathToFileURL } from 'node:url';
import * as path from 'node:path';
import { SarifBuilder, SarifRunBuilder, SarifResultBuilder, SarifRuleBuilder } from 'node-sarif-builder';
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
import { Messages } from '@salesforce/core';
Expand Down Expand Up @@ -65,7 +65,8 @@ export default class MetalintRun extends SfCommand<MetalintRunResult> {
ruleId: 'fields-must-have-descriptions',
messageText: 'Field is missing a description',
level: 'error' as const,
fileUri: pathToFileURL(field).toString(),
// fileUri: pathToFileURL(field).toString(),
fileUri: path.relative(process.cwd(), field).replace(/\\/g, '/'),
};

sarifResultBuilder.initSimple(sarifResultInit);
Expand Down
Loading