Skip to content

Commit

Permalink
Fix static analysis failures
Browse files Browse the repository at this point in the history
These were not being picked up by gh actions because we only run
specific tests
  • Loading branch information
jack-w-shaw committed Jul 24, 2023
1 parent 0c03afa commit 678eca1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 20 deletions.
1 change: 1 addition & 0 deletions core/changestream/terms.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright 2023 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.

package changestream

var (
Expand Down
14 changes: 0 additions & 14 deletions domain/controllerconfig/package_test.go

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2023 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.

package controllerconfig
package service

import (
ctx "context"
Expand All @@ -12,7 +12,6 @@ import (

jujucontroller "github.com/juju/juju/controller"
"github.com/juju/juju/database/testing"
domainservice "github.com/juju/juju/domain/controllerconfig/service"
domainstate "github.com/juju/juju/domain/controllerconfig/state"
schematesting "github.com/juju/juju/domain/schema/testing"
)
Expand All @@ -25,7 +24,7 @@ var _ = gc.Suite(&controllerconfigSuite{})

func (s *controllerconfigSuite) TestControllerConfigRoundTrips(c *gc.C) {
st := domainstate.NewState(testing.TxnRunnerFactory(s.TxnRunner()))
srv := domainservice.NewService(st, nil)
srv := NewService(st, nil)

cfgIn := jujucontroller.Config{
jujucontroller.AuditingEnabled: true,
Expand Down
4 changes: 2 additions & 2 deletions tests/suites/static_analysis/doc_go.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def check_all(argv):
except:
print("{0} -i <ignore>".format(argv[0]))
sys.exit(2)

ignores = []
for opt, arg in opts:
if opt in ("-h", "--help"):
Expand Down Expand Up @@ -116,7 +116,7 @@ def package_comment_files(package):

def file_is_generated_mocks(path):
with open(path) as f:
return f.readline().strip() == "// Code generated by MockGen. DO NOT EDIT."
return f.readline().strip().startswith("// Code generated by MockGen.")

if __name__ == '__main__':
check_all(sys.argv)
2 changes: 1 addition & 1 deletion worker/uniter/api/uniter_mocks.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 678eca1

Please sign in to comment.