Skip to content

Commit

Permalink
Use - instead of --stdin-filename
Browse files Browse the repository at this point in the history
  • Loading branch information
nobodywasishere committed Dec 2, 2024
1 parent d61838d commit fcc2d7e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ameba.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export class Ameba {
if (!virtual) {
args.push(document.fileName)
} else {
args.push('--stdin-filename', document.fileName);
// Indicate that the source is passed through STDIN
args.push('-');

// Disabling these as they're common when typing
args.push('--except', 'Lint/Formatting,Layout/TrailingBlankLines,Layout/TrailingWhitespace,Naming/Filename');
Expand Down Expand Up @@ -164,7 +165,9 @@ export class Ameba {
}

let diagnosticUri: Uri;
if (path.isAbsolute(source.path)) {
if (virtual) {
diagnosticUri = document.uri;
} else if (path.isAbsolute(source.path)) {
diagnosticUri = Uri.parse(source.path)
} else if (document.isUntitled) {
diagnosticUri = document.uri;
Expand Down

0 comments on commit fcc2d7e

Please sign in to comment.