mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #831] Code clean-up #506
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#506
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @catthehacker on GitHub (Sep 27, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/831
Originally assigned to: @catthehacker on GitHub.
I'm not the best person to describe things so pardon mess below
nolintamount of code with disabled linting keeps increasing, it should be checked if we can prevent that
github.com/nektos/act@7a426a0f37/cmd/root.go (L152-L153)github.com/nektos/act@7a426a0f37/pkg/common/git.go (L276-L279)github.com/nektos/act@7a426a0f37/pkg/container/docker_run.go (L549-L550)github.com/nektos/act@7a426a0f37/pkg/model/planner.go (L92-L94)github.com/nektos/act@7a426a0f37/pkg/model/workflow.go (L214-L217)github.com/nektos/act@7a426a0f37/pkg/runner/expression.go (L131-L142)github.com/nektos/act@7a426a0f37/pkg/runner/step_context.go (L454-L455)add missing error checking where possible, where definitely sure it's not required/helpful, annotate it with a commenttestdata shouldn't be duplicated and cross-testing should help prevent issue
it's fine if we have dedicated tests for some functions but most of it could be verified by all packages
something like this?
currently logging in whole
actis a mess (IMO), debug/info messages have been enabled/disabled/moved, error checking is missing in places, terminal is clogged with git and other spammy idea is to re-work all logging into central package (
common/logger) and implement debug levels (e.g.:1- minimal debug info,2- additional debugging,3- all debug), it should be fine for local development to run with level1/2, in some extreme cases one can enable3(which would be also default for CI)github.com/nektos/act@7a426a0f37/pkg/container/docker_logger.go (L25-L76)github.com/nektos/act@7a426a0f37/pkg/runner/runner_test.go (L123)@catthehacker commented on GitHub (Sep 27, 2021):
@cplee, i appreciate any thoughts you have on this
@cplee commented on GitHub (Oct 18, 2021):
@catthehacker thanks for taking initiative with this. Here's some thoughts:
nolint- this would be great to pull out as its own issue. This will be a bit challenging and requiring good test coverage first for each to ensure reducing cyclomatic complexity doesnt introduce bugs.@catthehacker commented on GitHub (Nov 13, 2021):
That probably was me going off from bad memory since I already cleaned that up in #679 😄
Few points I noticed over time:
arm64test to own func and removecontainerArchitecturefromTestJobFileInfo, I think it wasn't best decision to do it that way, also add docs about requirements for tests or install qemu arm64 automaticallywip:
testdata/github.com/nektos/act@ec34eb9532/pkg/runner/runner_test.go (L124)github.com/nektos/act@ec34eb9532/pkg/runner/expression_test.go (L211)github.com/nektos/act@ec34eb9532/pkg/runner/run_context_test.go (L162)@ChristopherHX commented on GitHub (Sep 17, 2022):
We seem to have multiple nolint formatting in our codebase. I'm not shure, which is our prefered formatting of them.
//nolint:<rule//nolint: <rule// nolint:<rule// nolint: <ruleThey only differ in spacing and the golang-cilint seem to accept all, I found all combinations with github search "nolint".
The docu of golang-cilint seem to use the first option in examples.
reference not founderror when using commit hash. #1487