Skip to content

Commit

Permalink
Set linelength to 140 for lint action. (#246)
Browse files Browse the repository at this point in the history
This resolves the discrepency between the line lenght used during the package
builds and the line length used by this action.

Workaround for this ament issue: ament/ament_lint#301

Signed-off-by: Prody <prodyd@amazon.com>
  • Loading branch information
david-prody committed Mar 5, 2021
1 parent 1eefe20 commit 8f57e31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Expand Down Expand Up @@ -1101,6 +1101,7 @@ function run() {
const packageNameList = packageName.split(RegExp("\\s"));
const rosDistribution = core.getInput("distribution");
const rosWorkspaceDir = core.getInput("workspace-directory") || process.env.GITHUB_WORKSPACE;
const additionalArguments = core.getInput("arguments");
yield exec.exec("rosdep", ["update"]);
yield exec.exec("sudo", ["apt-get", "update"]);
yield runAptGetInstall([`ros-${rosDistribution}-ament-${linterToolDashes}`]);
Expand All @@ -1113,7 +1114,7 @@ function run() {
yield exec.exec("bash", [
"-c",
`source /opt/ros/${rosDistribution}/setup.sh && ` +
`ament_${linterTool} $(colcon list --packages-select ${packageNameList.join(" ")} -p)`
`ament_${linterTool} $(colcon list --packages-select ${packageNameList.join(" ")} -p) --linelength=140 ${additionalArguments}`
], options);
}
catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion src/action-ros-lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export async function run() {
`source /opt/ros/${rosDistribution}/setup.sh && ` +
`ament_${linterTool} $(colcon list --packages-select ${packageNameList.join(
" "
)} -p) ${additionalArguments}`
)} -p) --linelength=140 ${additionalArguments}`
],
options
);
Expand Down

0 comments on commit 8f57e31

Please sign in to comment.