Skip to content

Commit

Permalink
style: apply automated linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
megalinter-bot committed Oct 2, 2023
1 parent 281fdee commit 7912312
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
10 changes: 6 additions & 4 deletions src/language/helpers/shortcuts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ import {
SdsClassMember,
SdsEnum,
SdsEnumVariant,
SdsImport, SdsImportedDeclaration,
SdsImport,
SdsImportedDeclaration,
SdsLiteral,
SdsLiteralType,
SdsModule,
SdsModuleMember,
SdsParameter,
SdsParameterList,
SdsPlaceholder, SdsQualifiedImport,
SdsPlaceholder,
SdsQualifiedImport,
SdsResult,
SdsResultList,
SdsStatement,
Expand Down Expand Up @@ -60,9 +62,9 @@ export const blockLambdaResultsOrEmpty = function (node: SdsBlockLambda | undefi
.toArray();
};

export const importedDeclarationsOrEmpty = function(node: SdsQualifiedImport | undefined): SdsImportedDeclaration[] {
export const importedDeclarationsOrEmpty = function (node: SdsQualifiedImport | undefined): SdsImportedDeclaration[] {
return node?.importedDeclarationList?.importedDeclarations ?? [];
}
};

export const literalsOrEmpty = function (node: SdsLiteralType | undefined): SdsLiteral[] {
return node?.literalList?.literals ?? [];
Expand Down
2 changes: 1 addition & 1 deletion src/language/safe-ds-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { SafeDsScopeProvider } from './scoping/safe-ds-scope-provider.js';
import { SafeDsValueConverter } from './grammar/safe-ds-value-converter.js';
import { SafeDsTypeComputer } from './typing/safe-ds-type-computer.js';
import { SafeDsCoreClasses } from './builtins/safe-ds-core-classes.js';
import {SafeDsPackageManager} from "./workspace/safe-ds-package-manager.js";
import { SafeDsPackageManager } from './workspace/safe-ds-package-manager.js';

/**
* Declaration of custom services - add your own service classes here.
Expand Down
9 changes: 6 additions & 3 deletions src/language/workspace/safe-ds-package-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
LangiumDocuments,
} from 'langium';
import { packageNameOrNull } from '../helpers/shortcuts.js';
import {isSdsSegment} from "../generated/ast.js";
import {isInternal} from "../helpers/checks.js";
import { isSdsSegment } from '../generated/ast.js';
import { isInternal } from '../helpers/checks.js';

export class SafeDsPackageManager {
private readonly astNodeLocator: AstNodeLocator;
Expand Down Expand Up @@ -66,7 +66,10 @@ export class SafeDsPackageManager {
* Returns all declarations that are defined in the given package or any of its (transitive) subpackages. The
* options can be used to filter the results.
*/
getDeclarationsInPackageOrSubpackage(packageName: string, options: GetDeclarationsOptions = {}): AstNodeDescription[] {
getDeclarationsInPackageOrSubpackage(
packageName: string,
options: GetDeclarationsOptions = {},
): AstNodeDescription[] {
const packageContents = this.getPackageContents(packageName);
if (!packageContents) {
return [];
Expand Down

0 comments on commit 7912312

Please sign in to comment.