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

Add edoc generation to CI so that it fails if doc have syntax errors #2695

Closed
wants to merge 4 commits into from

Conversation

michalwski
Copy link
Contributor

This PR fixes edoc errors and adds its verification to CI.

Some time ago @erszcz made an effort to fix our edoc, so that it works for MongooseIM. It's not been checked in our CI, so since then new errors in doc syntax were introduced.

Proposed changes include:

  • edoc configuration in rebar.config so that the output is put in edoc directory. The default doc doesn't play nice with our repo since we already have markdown documentation in doc dir.
  • edoc generation as part of CI, so that new errors are not introduced
  • TODO: fixes to newly added errors

Currently edoc is not able to generate documentation for callbacks.
Instead it thinks this is documentation for the first function in the
module defined below the callbacks.
@mongoose-im
Copy link
Collaborator

mongoose-im commented Mar 31, 2020

8075.1 / Erlang 22.0 / small_tests / 53ed834
Reports root / small


8075.2 / Erlang 22.0 / internal_mnesia / 53ed834
Reports root/ big
OK: 1395 / Failed: 0 / User-skipped: 155 / Auto-skipped: 0


8075.4 / Erlang 22.0 / mysql_redis / 53ed834
Reports root/ big
OK: 2625 / Failed: 0 / User-skipped: 205 / Auto-skipped: 0


8075.3 / Erlang 22.0 / odbc_mssql_mnesia / 53ed834
Reports root/ big
OK: 2630 / Failed: 0 / User-skipped: 200 / Auto-skipped: 0


8075.5 / Erlang 22.0 / riak_mnesia / 53ed834
Reports root/ big
OK: 1528 / Failed: 0 / User-skipped: 162 / Auto-skipped: 0


8075.6 / Erlang 22.0 / ldap_mnesia / 53ed834
Reports root/ big
OK: 1359 / Failed: 0 / User-skipped: 191 / Auto-skipped: 0


8075.7 / Erlang 22.0 / elasticsearch_and_cassandra_mnesia / 53ed834
Reports root/ big
OK: 328 / Failed: 0 / User-skipped: 28 / Auto-skipped: 0


8075.9 / Erlang 21.3 / pgsql_mnesia / 53ed834
Reports root/ big / small
OK: 2643 / Failed: 0 / User-skipped: 187 / Auto-skipped: 0

@mongoose-im
Copy link
Collaborator

mongoose-im commented Mar 31, 2020

8076.1 / Erlang 22.0 / small_tests / ab93be9
Reports root / small


8076.2 / Erlang 22.0 / internal_mnesia / ab93be9
Reports root/ big
OK: 1395 / Failed: 0 / User-skipped: 155 / Auto-skipped: 0


8076.3 / Erlang 22.0 / odbc_mssql_mnesia / ab93be9
Reports root/ big
OK: 2630 / Failed: 0 / User-skipped: 200 / Auto-skipped: 0


8076.4 / Erlang 22.0 / mysql_redis / ab93be9
Reports root/ big
OK: 2625 / Failed: 0 / User-skipped: 205 / Auto-skipped: 0


8076.7 / Erlang 22.0 / elasticsearch_and_cassandra_mnesia / ab93be9
Reports root/ big
OK: 328 / Failed: 0 / User-skipped: 28 / Auto-skipped: 0


8076.5 / Erlang 22.0 / riak_mnesia / ab93be9
Reports root/ big
OK: 1528 / Failed: 0 / User-skipped: 162 / Auto-skipped: 0


8076.6 / Erlang 22.0 / ldap_mnesia / ab93be9
Reports root/ big
OK: 1359 / Failed: 0 / User-skipped: 191 / Auto-skipped: 0


8076.9 / Erlang 21.3 / pgsql_mnesia / ab93be9
Reports root/ big / small
OK: 2643 / Failed: 0 / User-skipped: 187 / Auto-skipped: 0

@codecov
Copy link

codecov bot commented Mar 31, 2020

Codecov Report

Merging #2695 into master will decrease coverage by 0.42%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2695      +/-   ##
==========================================
- Coverage   79.19%   78.77%   -0.43%     
==========================================
  Files         360      360              
  Lines       30344    30344              
==========================================
- Hits        24030    23902     -128     
- Misses       6314     6442     +128     
Impacted Files Coverage Δ
src/ejabberd_cowboy.erl 88.78% <ø> (ø)
src/event_pusher/mod_event_pusher_push_plugin.erl 100.00% <ø> (ø)
src/mod_auth_token_rdbms.erl 0.00% <0.00%> (-100.00%) ⬇️
src/inbox/mod_inbox_rdbms_pgsql.erl 0.00% <0.00%> (-100.00%) ⬇️
src/sasl/cyrsasl_oauth.erl 14.28% <0.00%> (-85.72%) ⬇️
src/rdbms/mongoose_rdbms_pgsql_codec_boolean.erl 0.00% <0.00%> (-77.78%) ⬇️
src/rdbms/mongoose_rdbms_pgsql.erl 32.35% <0.00%> (-61.77%) ⬇️
src/mod_auth_token.erl 62.58% <0.00%> (-21.59%) ⬇️
src/elasticsearch/mongoose_elasticsearch.erl 76.92% <0.00%> (-7.70%) ⬇️
src/mongoose_lib.erl 78.57% <0.00%> (-7.15%) ⬇️
... and 26 more

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 6057702...667a784. Read the comment docs.

Copy link
Collaborator

@NelsonVides NelsonVides left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be cool to have dialyzer and edoc as two separate jobs on CircleCI, as we have unlimited parallelism already, instead of mixing them, but on the other hand in Travis we don't have such unlimited parallelism. So maybe as two different steps of the same job, so that in Travis they run one after the other and in CircleCi they run at least in separate steps. It's just better organised, but I don't really have a strong opinion there 🤔

@michalwski
Copy link
Contributor Author

Yeah, I wanted to do it as 2 different steps. It's easy to do on CirlceCI, not that easy (I didn't find a quick solution) with travis considering how our tests are started now.

@gustawlippa
Copy link
Contributor

We sometimes loose knowledge, or even work done for MongooseIM 😢 This PR got lost this way, and this was done in #3333 actually.

@gustawlippa gustawlippa closed this Mar 3, 2022
@NelsonVides NelsonVides deleted the fix-edoc-and-add-it-to-ci branch March 3, 2022 16:09
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.

4 participants