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
6 changes: 6 additions & 0 deletions vs-code-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Change Log
## 4.1.7
Fixed:
- The 'Merge post processor' feature does now utilize the include path if specified
- Fixed an issue where ESLint did not recognize the embedded rules file.
Updated:
- Updated embedded ESLint rules file.
## 4.1.6
Changed:
- Option 'Download CNC exporting post processor' now redirects to the Fusion post library website
Expand Down
22 changes: 14 additions & 8 deletions vs-code-extension/out/src/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,20 +253,25 @@ function showPostEngineVersion() {
}
}

/** Merges the post processor with any files with the '.merge.cps' extension in the same directory */
/** Merges the post processor with any files with the '.merged.cps' extension in the same directory */
function mergePost() {
checkPostKernel();
let child = require('child_process').execFile;
let parameters = [];
postFile = getCpsPath();
var mergeFile = postFile.split(".cps")[0] + ".merge.cps";
var mergeFile = postFile.split(".cps")[0] + ".merged.cps";
parameters = [postFile, "--merge", mergeFile];

let includePath = vscode.workspace.getConfiguration("AutodeskPostUtility").get('includePath');
if (fileExists(includePath)) {
parameters.push("--include", includePath); // Set the include path
}
try {
var _timeout = vscode.workspace.getConfiguration("AutodeskPostUtility").get("timeoutForPostProcessing");
_timeout *= 1000; // convert to milliseconds
child(postExecutable, parameters, { timeout: _timeout }, function (err, data) {
if (err) {
errorMessage("Merge failed.");
child(postExecutable, parameters, { timeout: _timeout }, function (err, stdout, stderr) {
if (stderr) {
errorMessage("Merge failed: " + stderr);
} else {
message("Merge successful. The merged post can be found in your post processors directory.");
}
Expand Down Expand Up @@ -1242,21 +1247,22 @@ function setEmbeddedEslintRules() {
let newEditorConfiguration
switch (vscode.workspace.getConfiguration("AutodeskPostUtility").get("useEmbeddedESLintRules")) {
case "Disabled":
newEditorConfiguration = Object.assign({}, currentEditorConfiguration.codeActionsOnSave, {"source.fixAll.eslint": false});
newEditorConfiguration = Object.assign({}, currentEditorConfiguration.codeActionsOnSave, {"source.fixAll.eslint": "never"});
newEslintConfiguration = Object.assign({}, currentEslintConfiguration.overrideConfigFile, {});
break;
case "Show ESLint issues only":
newEditorConfiguration = Object.assign({}, currentEditorConfiguration.codeActionsOnSave, {"source.fixAll.eslint": false});
newEditorConfiguration = Object.assign({}, currentEditorConfiguration.codeActionsOnSave, {"source.fixAll.eslint": "never"});
break;
case "Show and fix ESLint issues":
newEditorConfiguration = Object.assign({}, currentEditorConfiguration.codeActionsOnSave, {"source.fixAll.eslint": true});
newEditorConfiguration = Object.assign({}, currentEditorConfiguration.codeActionsOnSave, {"source.fixAll.eslint": "explicit"});
break;
default:
errorMessage("Unknown command for setting useEmbeddedESLintRules.")
return;
}
vscode.workspace.getConfiguration("eslint").update("options", newEslintConfiguration, true);
vscode.workspace.getConfiguration("editor").update("codeActionsOnSave", newEditorConfiguration, true);
vscode.workspace.getConfiguration("eslint").update("useFlatConfig", false, true);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion vs-code-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "hsm-post-processor",
"displayName": "Autodesk Fusion Post Processor Utility",
"description": "Post processor utility.",
"version": "4.1.6",
"version": "4.1.7",
"icon": "res/icons/logo.png",
"author": {
"name": "Autodesk",
Expand Down
7 changes: 6 additions & 1 deletion vs-code-extension/res/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,12 @@
"no-magic-numbers": "off",
"no-mixed-operators": "off",
"no-mixed-requires": "error",
"no-multi-spaces": "off",
"no-multi-spaces": ["error", {
"ignoreEOLComments": true,
"exceptions": {
"Property": true
}
}],
"no-multi-str": "off",
"no-multiple-empty-lines": [2, {
"max": 1
Expand Down
Loading