erlang / otp

Erlang/OTP
http://erlang.org
Apache License 2.0
11.15k stars 2.92k forks source link

Add warnings as errors for ex_doc #8596

Closed garazdawi closed 6 days ago

garazdawi commented 1 week ago

This PR adds a mechanism to scan the stderr output from ex_doc for warnings and if found fail the build.

github-actions[bot] commented 1 week ago

CT Test Results

    5 files    191 suites   2h 11m 6s :stopwatch: 1 953 tests 1 893 :white_check_mark: 59 :zzz: 1 :x: 2 714 runs  2 626 :white_check_mark: 87 :zzz: 1 :x:

For more details on these failures, see this check.

Results for commit 75913d77.

:recycle: This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

chiroptical commented 1 week ago

Made some comments. Feel free to tag me if you want me to test again. Really appreciate you helping me with this!

(I don't expect you to do this) If for some reason you want to test yourself my branch is here https://github.com/chiroptical/nixpkgs/tree/test-ex-doc-updates. You would need nix and then run nix-build -A erlang_27. I am more than happy to do this because after the initial change works I want to remove some configuration from the builder and test that.

garazdawi commented 1 week ago

New attempt, you should be able to set EX_DOC=/path/to/ex_doc before running make or configure and it should use that ex_doc.

wojtekmach commented 1 week ago

@garazdawi as you may know we have an open PR that adds --warnings-as-errors to ExDoc (https://github.com/elixir-lang/ex_doc/pull/1831) which I think would handle most if not all warnings that this PR catches. So if you'd be OK with relying on ExDoc for this instead we can try to push it over the finish line soon.

garazdawi commented 1 week ago

@wojtekmach I would be happy to use a built-in ex_doc warnings as errors. I did this PR because a bunch of warnings slipped trough in Erlang/OTP and it did not seem like there was much interest in getting https://github.com/elixir-lang/ex_doc/pull/1831 merged anytime soon.