Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gometalinter always failed in Travis CI and TeamCity #3599

Closed
gangliao opened this issue Aug 21, 2017 · 5 comments
Closed

gometalinter always failed in Travis CI and TeamCity #3599

gangliao opened this issue Aug 21, 2017 · 5 comments
Assignees

Comments

@gangliao
Copy link
Contributor

My local pre-commit passed all check and detection.

image

But, In CI, it failed. I have no idea how to suppress this issue. Please help me fix it, it
blocked this PR #3489 to be merged:

gometalinter.............................................................Failed
hookid: gometalinter
pserver/service.go:98:21:warning: undeclared name: optimizer (unconvert)
pserver/service.go:193:42:warning: undeclared name: newOptimizer (unconvert)
pserver/service.go:236:9:warning: invalid operation: o (variable of type *invalid type) has no field or method UpdateParameter (unconvert)
pserver/service.go:258:26:warning: invalid operation: opt (variable of type *invalid type) has no field or method elementType (unconvert)
pserver/service.go:259:22:warning: invalid operation: opt (variable of type *invalid type) has no field or method GetWeights (unconvert)
pserver/service.go:284:26:warning: invalid operation: opt (variable of type *invalid type) has no field or method elementType (unconvert)
pserver/service.go:285:22:warning: invalid operation: opt (variable of type *invalid type) has no field or method GetWeights (unconvert)
pserver/service.go:286:15:warning: invalid operation: opt (variable of type *invalid type) has no field or method config (unconvert)
pserver/service.go:287:14:warning: invalid operation: opt (variable of type *invalid type) has no field or method GetStates (unconvert)
pserver/service.go:162:30:warning: undeclared name: optimizer (unconvert)
pserver/service.go:171:29:warning: undeclared name: newOptimizer (unconvert)
pserver/service.go:98:21:warning: error return value not checked (undeclared name: optimizer) (errcheck)
pserver/service.go:193:42:warning: error return value not checked (undeclared name: newOptimizer) (errcheck)
pserver/service.go:236:9:warning: error return value not checked (invalid operation: o (variable of type *invalid type) has no field or method UpdateParameter) (errcheck)
pserver/service.go:258:26:warning: error return value not checked (invalid operation: opt (variable of type *invalid type) has no field or method elementType) (errcheck)
pserver/service.go:259:22:warning: error return value not checked (invalid operation: opt (variable of type *invalid type) has no field or method GetWeights) (errcheck)
pserver/service.go:284:26:warning: error return value not checked (invalid operation: opt (variable of type *invalid type) has no field or method elementType) (errcheck)
pserver/service.go:285:22:warning: error return value not checked (invalid operation: opt (variable of type *invalid type) has no field or method GetWeights) (errcheck)
pserver/service.go:286:15:warning: error return value not checked (invalid operation: opt (variable of type *invalid type) has no field or method config) (errcheck)
pserver/service.go:287:14:warning: error return value not checked (invalid operation: opt (variable of type *invalid type) has no field or method GetStates) (errcheck)
pserver/service.go:162:30:warning: error return value not checked (undeclared name: optimizer) (errcheck)
pserver/service.go:171:29:warning: error return value not checked (undeclared name: newOptimizer) (errcheck)
pserver/optimizer_test.go:36:7:warning: error return value not checked (undeclared name: newOptimizer) (errcheck)
/home/travis/build/PaddlePaddle/Paddle
Your change doesn't follow PaddlePaddle's code style.
Please use pre-commit to check what is wrong.
@gangliao
Copy link
Contributor Author

gangliao commented Aug 21, 2017

It's better if you guys can commit this PR #3489 to help it suppress this issue

@helinwang
Copy link
Contributor

@gangliao TeamCity failed because CI unit test did not pass:


[01:27:34]	[----------] 4 tests from OpRegistry
[01:27:34]	[ RUN ] OpRegistry.CreateOp
[01:27:34]	[ OK ] OpRegistry.CreateOp (0 ms)
[01:27:34]	[ RUN ] OpRegistry.IllegalAttr
[01:27:34]	[ OK ] OpRegistry.IllegalAttr (7 ms)
[01:27:34]	[ RUN ] OpRegistry.DefaultValue
[01:27:34]	[ OK ] OpRegistry.DefaultValue (0 ms)
[01:27:34]	[ RUN ] OpRegistry.CustomChecker
[01:27:34]	[ OK ] OpRegistry.CustomChecker (6 ms)
[01:27:34]	[----------] 4 tests from OpRegistry (13 ms total)
[01:27:34]	
[01:27:34]	[----------] 2 tests from ProtoMaker
[01:27:34]	[ RUN ] ProtoMaker.DuplicatedAttr
[01:27:34]	/paddle/paddle/framework/op_registry_test.cc:192: Failure
[01:27:34]	Expected: proto_maker.Validate() throws an exception of type paddle::platform::EnforceNotMet.
[01:27:34]	Actual: it throws a different type.
[01:27:34]	[ FAILED ] ProtoMaker.DuplicatedAttr (2 ms)
[01:27:34]	[ RUN ] ProtoMaker.DuplicatedInOut
[01:27:34]	/paddle/paddle/framework/op_registry_test.cc:208: Failure
[01:27:34]	Expected: proto_maker.Validate() throws an exception of type paddle::platform::EnforceNotMet.
[01:27:34]	Actual: it throws a different type.
[01:27:34]	[ FAILED ] ProtoMaker.DuplicatedInOut (1 ms)
[01:27:34]	[----------] 2 tests from ProtoMaker (3 ms total)
[01:27:34]	
[01:27:34]	[----------] Global test environment tear-down
[01:27:34]	[==========] 6 tests from 2 test cases ran. (16 ms total)
[01:27:34]	[ PASSED ] 4 tests.
[01:27:34]	[ FAILED ] 2 tests, listed below:
[01:27:34]	[ FAILED ] ProtoMaker.DuplicatedAttr
[01:27:34]	[ FAILED ] ProtoMaker.DuplicatedInOut

@helinwang
Copy link
Contributor

helinwang commented Aug 22, 2017

Travis CI failed because renaming optimizer.go to optimizer.go.in breaks building Go without cmake (it runs before the cmake templating happens, so no optimizer.go exists in the FS):

hookid: gometalinter
pserver/service.go:98:21:warning: undeclared name: optimizer (unconvert)
pserver/service.go:193:42:warning: undeclared name: newOptimizer (unconvert)
pserver/service.go:236:9:warning: invalid operation: o (variable of type *invalid type) has no field or method UpdateParameter (unconvert)
pserver/service.go:258:26:warning: invalid operation: opt (variable of type *invalid type) has no field or method elementType (unconvert)
pserver/service.go:259:22:warning: invalid operation: opt (variable of type *invalid type) has no field or method GetWeights (unconvert)
pserver/service.go:284:26:warning: invalid operation: opt (variable of type *invalid type) has no field or method elementType (unconvert)
pserver/service.go:285:22:warning: invalid operation: opt (variable of type *invalid type) has no field or method GetWeights (unconvert)
pserver/service.go:286:15:warning: invalid operation: opt (variable of type *invalid type) has no field or method config (unconvert)
pserver/service.go:287:14:warning: invalid operation: opt (variable of type *invalid type) has no field or method GetStates (unconvert)

Do we really need the rename?

@gangliao
Copy link
Contributor Author

Because some link flags might be needed if we enable code coverage.

@gangliao
Copy link
Contributor Author

-lstdc++ -lm ${CODE_COVERAGE_FLAGS} 

heavengate pushed a commit to heavengate/Paddle that referenced this issue Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants