Skip to content
Merged
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Linting results can be improved by providing additional options to the compiler.
You can control the include paths to be used by the linter with the `fortran.linter.includePaths` option.

| ❗️ Important | For the best linting results `linter.includePaths` should match the included paths for your project's compilation. |
| ------------- | ------------------------------------------------------------------------------------------------------------------ |
| ------------ | ------------------------------------------------------------------------------------------------------------------ |

```json
{
Expand All @@ -114,7 +114,7 @@ You can control the include paths to be used by the linter with the `fortran.lin
```

| ❗️ Important | If a glob pattern is used only directories matching the pattern will be included |
| ------------- | -------------------------------------------------------------------------------- |
| ------------ | -------------------------------------------------------------------------------- |

### Additional linting options

Expand Down
5 changes: 4 additions & 1 deletion src/lint/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ export class LinterSettings {
}

export class FortranLintingProvider {
constructor(private logger: Logger = new Logger(), private storageUI: string = undefined) {
constructor(
private logger: Logger = new Logger(),
private storageUI: string = undefined
) {
// Register the Linter provider
this.fortranDiagnostics = vscode.languages.createDiagnosticCollection('Fortran');
this.settings = new LinterSettings(this.logger);
Expand Down
5 changes: 4 additions & 1 deletion src/lsp/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import {
export const clients: Map<string, LanguageClient> = new Map();

export class FortlsClient {
constructor(private logger: Logger, private context?: vscode.ExtensionContext) {
constructor(
private logger: Logger,
private context?: vscode.ExtensionContext
) {
this.logger.debug('[lsp.client] Fortran Language Server -- constructor');

// if context is present
Expand Down
23 changes: 17 additions & 6 deletions test/ui/install-prompts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ describe('Download dependencies', () => {
await browser.openResources(`${path.resolve(root, 'main.f90')}`);
});

afterEach(async () => {
const center = await new Workbench().openNotificationsCenter();
await center.clearAllNotifications();
});

describe('Download fortls language server', () => {
it('install via pip', async () => {
const workbench = new Workbench();
Expand All @@ -26,9 +31,12 @@ describe('Download dependencies', () => {
const message = await info.getMessage();
const actions = await info.getActions();
const title = await actions[0].getTitle();
console.log(message);
await info.takeAction(title);
strictEqual(title, 'Install');
const source = await info.getSource();
if (source.includes('Modern Fortran')) {
console.log(message);
await info.takeAction(title);
strictEqual(title, 'Install');
}
}
});
});
Expand All @@ -43,9 +51,12 @@ describe('Download dependencies', () => {
const message = await info.getMessage();
const actions = await info.getActions();
const title = await actions[0].getTitle();
console.log(`2nd lool: ${message}`);
await info.takeAction(title);
strictEqual(title, 'Install');
const source = await info.getSource();
if (source.includes('Modern Fortran')) {
console.log(message);
await info.takeAction(title);
strictEqual(title, 'Install');
}
}
});
});
Expand Down