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

Compile with warnings and fix exiting warnings #227

Merged
merged 5 commits into from
Nov 10, 2021

Conversation

dylanahsmith
Copy link
Collaborator

It is easy to make some stupid mistakes that wastes some time debugging when the compiler could have pointer out the problem. Using -Wall (with gcc/clang) will enable warnings for errors that compilers can detect.

I've addressed the existing warnings in the first few commits. I enabled compiler warnings by default when compiling locally. Additionally, I used -Werror to treat warnings as errors in CI.

I chose not to treat warnings as errors locally, mostly because of experience with lint like errors interrupting the development/debug feedback loop when they aren't really relevant. Although, this is kind of a philosophical divergence from Go (e.g. how it warns about unused imports when adding in import "fmt" for debugging), so I can enable -Werror locally if other v8go devs disagree.

@codecov
Copy link

codecov bot commented Nov 9, 2021

Codecov Report

Merging #227 (612c439) into master (a582436) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #227   +/-   ##
=======================================
  Coverage   95.59%   95.59%           
=======================================
  Files          16       16           
  Lines         545      545           
=======================================
  Hits          521      521           
  Misses         15       15           
  Partials        9        9           
Impacted Files Coverage Δ
object.go 100.00% <100.00%> (ø)
object_template.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a582436...612c439. Read the comment docs.

@dylanahsmith dylanahsmith merged commit 0e32bb0 into rogchap:master Nov 10, 2021
@dylanahsmith dylanahsmith deleted the compiler-warnings branch November 10, 2021 00:00
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

Successfully merging this pull request may close these issues.

2 participants