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

Feat additionnal project yaml #128

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@
"default": ".",
"scope": "resource"
},
"ceedlingExplorer.projectCustom": {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it could be named options to keep the same ceedling vocabulary. It should also be a list of name.

"markdownDescription": "Optionnal YAML file, configuration of this file will be merged with the main project file (project.yml) at runtime. Example `your_config.yml` will be used as `ceedling project:your_config.yml` usefull to add specific compiler configurations",
"type": "string",
"default": "null",
"scope": "resource"
},
"ceedlingExplorer.shellPath": {
"description": "Path to the shell where Ceedling is installed",
"type": "string",
Expand Down Expand Up @@ -245,4 +251,4 @@
}
]
}
}
}
9 changes: 8 additions & 1 deletion src/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,11 @@ export class CeedlingAdapter implements TestAdapter {
return shellPath !== "null" ? shellPath : undefined;
}

private getProjectCustom(): string {
const projectCustom = this.getConfiguration().get('projectCustom', 'null');
return projectCustom !== "null" ? projectCustom : "";
}

private getProjectPath(): string {
const defaultProjectPath = '.';
const projectPath = this.getConfiguration().get<string>('projectPath', defaultProjectPath);
Expand Down Expand Up @@ -337,7 +342,9 @@ export class CeedlingAdapter implements TestAdapter {
}

private getCeedlingCommand(args: ReadonlyArray<string>) {
const line = `ceedling ${args.join(" ")}`;
const projectCustom = this.getProjectCustom();
const project = projectCustom ? `project:${projectCustom} ` : '';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation define a options: parameter. Is project: an alias?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have always used project: probably this was documented this way in previous versions of Ceedling but I will do some tests with options: and update this PR

const line = `ceedling ${project}${args.join(" ")}`;
return line;
}

Expand Down