Skip to content

Commit

Permalink
refactor: rename unsed parameters to _ (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
bfabio authored Feb 20, 2024
1 parent fc0dbf9 commit ec14eb0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/crawl.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var crawlCmd = &cobra.Command{
When run with no arguments, the publishers are fetched from the API,
otherwise the passed YAML files are used.`,
Args: cobra.MinimumNArgs(0),
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, args []string) {
c := crawler.NewCrawler(dryRun)

var publishers []common.Publisher
Expand Down
2 changes: 1 addition & 1 deletion cmd/download_publishers.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var downloadPublishersCmd = &cobra.Command{
Short: "Download the list of repos and orgs from the onboarding portal.",
Long: `Download the list of repos and orgs from the onboarding portal and convert it into a publishers.yml.`,
Args: cobra.ExactArgs(2),
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, args []string) {
var publishers []common.Publisher
if _, err := os.Stat(args[1]); err == nil {
data, err := ioutil.ReadFile(args[1])
Expand Down
2 changes: 1 addition & 1 deletion cmd/one.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var oneCmd = &cobra.Command{
according to the supplied file(s).
No organizations! Only single repositories!`,
Args: cobra.MinimumNArgs(2),
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, args []string) {
c := crawler.NewCrawler(dryRun)

paths := args[1:]
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var (
Short: "A crawler for publiccode.yml files.",
Long: `A fast and robust publiccode.yml file crawler.
Complete documentation is available at https://github.com/italia/publiccode-crawler`,
Run: func(cmd *cobra.Command, args []string) {
Run: func(cmd *cobra.Command, _ []string) {
err := cmd.Help()
if err != nil {
log.Fatal(err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version number of the crawler.",
Long: `All software has versions. This too.`,
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
//nolint:forbidigo
fmt.Println("Version:\t", internal.VERSION)
//nolint:forbidigo
Expand Down

0 comments on commit ec14eb0

Please sign in to comment.