3 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
f566e04888 chore: enable more linters and fix all critical issues
Enabled additional linters from fakemachine configuration:
- errorlint: Error wrapping with %w
- misspell: Spelling checks
- revive: Code quality checks
- whitespace: Formatting checks

Fixed all issues including:
- Error handling: Added proper error checks for all function returns
- Error wrapping: Changed %v to %w for proper error wrapping
- Type assertions: Used errors.As instead of direct type assertions
- Unused parameters: Renamed to underscore where appropriate
- Variable naming: Fixed ALL_CAPS constants and underscored names
- Whitespace: Removed unnecessary leading/trailing newlines
- Code flow: Removed unnecessary else blocks

Renamed types (breaking internal API changes):
- DebosState → State
- DebosContext → Context
- DownloadHttpUrl → DownloadHTTPURL

Fixed struct field naming with proper YAML tags:
- Url → URL (with yaml:"url" tag)
- TlsClientCertPath → TLSClientCertPath (kept yaml:"tls-client-cert-path")
- TlsClientKeyPath → TLSClientKeyPath (kept yaml:"tls-client-key-path")
- validateUrl → validateURL method

Co-authored-by: sjoerdsimons <22603932+sjoerdsimons@users.noreply.github.com>
2025-10-01 21:21:22 +02:00
Denis Pynkin
5d73e460c3 Introduce packages 'debos' and 'actions'
This change allows to import and use core modules from "debos" package and
actions from "actions" package. Add prefix 'debos.' to all symbols imported
from core "debos" package to satisfy syntax check.

Package "actions" shouldn't keep any common function or structure:

- function 'DownloadHttpUrl()' is moved from 'DownloadAction' to "debos"
  package. New file 'net.go' has been added to keep a common network functions
  in core part of debos.

- move common functions for extracting files from 'UnpackAction' to 'debos'
  package. File 'archiver.go' has been added for common operations on archives.

Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
2017-09-05 15:24:38 +03:00
Sjoerd Simons
a2b115f007 Refactor command runner
Factor out the command runner helper into its own file and make it an
object rather then a helper function so multiple runs can easily be done
using the same setup. Also rather then pulling out the output afterwards
implement a small object implementing the Writer interface to be used
for stdout/stderr which simply re-outputs the information line-based
with a prefix attached for easy debugging.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2017-07-31 12:06:07 +02:00