Skip to content

Create generateWebsite #5849

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

Merged
merged 2 commits into from
Apr 2, 2023
Merged

Create generateWebsite #5849

merged 2 commits into from
Apr 2, 2023

Conversation

BraisGabin
Copy link
Member

@BraisGabin BraisGabin commented Feb 27, 2023

generateDocumentation is a god task. It generates far too much things:

  • Dokka/javadoc
  • Default-config
  • Config for first party rule sets
  • Deprecation list
  • Rule documentation

I want to split it. This is the just the first step. I created generateWebsite. This task generates the necessary files to create our website. This way when we execute generateDocumentation we don't need to run dokkaHtml. Also, we shouldn't know on detekt-api where the documentation should be stored. For that reason I removed it from there and I copy the output of that task to the correct directory.

As I said, this is just the first step. A quick win.

@BraisGabin BraisGabin added the housekeeping Marker for housekeeping tasks and refactorings label Feb 27, 2023
@BraisGabin BraisGabin added this to the 1.23.0 milestone Feb 27, 2023
@codecov
Copy link

codecov bot commented Feb 27, 2023

Codecov Report

Merging #5849 (0fd7fee) into main (dc96841) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main    #5849   +/-   ##
=========================================
  Coverage     84.48%   84.48%           
  Complexity     3788     3788           
=========================================
  Files           546      546           
  Lines         12937    12937           
  Branches       2275     2275           
=========================================
  Hits          10930    10930           
  Misses          877      877           
  Partials       1130     1130           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@3flex
Copy link
Member

3flex commented Feb 27, 2023

we shouldn't know on detekt-api where the documentation should be stored

True, but copying output from a task in a different project is definitely not the Gradle way™.

Instead, please review this: https://docs.gradle.org/current/userguide/cross_project_publications.html

Or leave that for another PR.

@BraisGabin
Copy link
Member Author

I don't get how that would work. detekt-api should declare its output as an artifact, correct. But then at detekt-generator I don't know how to consume it so I can copy that artifact to the desired folder.

I also checked the artifacts that we have defined at detekt-generator. But those are different cases because detekt-generator already store the files at the correct folder (other thing I would like to change).

So, to unlock this PR I just removed that part. I will revisit this in the future.

@BraisGabin
Copy link
Member Author

@cortinico Vecel is failing but when I follow the "Details" link it says 404. Do I need permissions to see it? Do you know what happen?

@cortinico
Copy link
Member

@cortinico Vecel is failing but when I follow the "Details" link it says 404. Do I need permissions to see it? Do you know what happen?

Mmm it should be public 🤔 I'm looking into why this is private

The error is a broken link on the website:

[ERROR] Unable to build website for locale en.
--
10:51:19.815 | [ERROR] Error: Docusaurus found broken links!
10:51:19.815 |  
10:51:19.815 | Please check the pages of your site in the list below, and make sure you don't reference any path that does not exist.
10:51:19.815 | Note: it's possible to ignore broken links with the 'onBrokenLinks' Docusaurus configuration, and let the build pass.
10:51:19.815 |  
10:51:19.815 | Exhaustive list of all broken links found:
10:51:19.816 |  
10:51:19.816 | - On source page path = /blog:
10:51:19.816 | -> linking to /kdoc/detekt-api/io.gitlab.arturbosch.detekt.api/-console-report/index.html
10:51:19.816 |  
10:51:19.816 | - On source page path = /blog/2019/08/14/custom-console-reports:
10:51:19.816 | -> linking to /kdoc/detekt-api/io.gitlab.arturbosch.detekt.api/-console-report/index.html
10:51:19.816 |  
10:51:19.816 | - On source page path = /blog/tags/guides:
10:51:19.816 | -> linking to /kdoc/detekt-api/io.gitlab.arturbosch.detekt.api/-console-report/index.html
10:51:19.816 |  
10:51:19.816 | at throwError (/vercel/path0/website/node_modules/@docusaurus/logger/lib/index.js:76:11)
10:51:19.816 | at handleBrokenLinks (/vercel/path0/website/node_modules/@docusaurus/core/lib/server/brokenLinks.js:153:47)
10:51:19.816 | at async buildLocale (/vercel/path0/website/node_modules/@docusaurus/core/lib/commands/build.js:181:5)
10:51:19.816 | at async tryToBuildLocale (/vercel/path0/website/node_modules/@docusaurus/core/lib/commands/build.js:38:20)
10:51:19.816 | at async mapAsyncSequential (/vercel/path0/website/node_modules/@docusaurus/utils/lib/jsUtils.js:34:24)
10:51:19.816 | at async Command.build (/vercel/path0/website/node_modules/@docusaurus/core/lib/commands/build.js:73:21)
10:51:19.817 | [INFO] Docusaurus version: 2.3.1

@cortinico
Copy link
Member

now it should be public 👍

@3flex
Copy link
Member

3flex commented Mar 2, 2023

Unrelated to the PR as such - I don't think commits and PRs should include "boy scout" in the title. I think the intention of making that kind of change is great but the commit messages themselves should exclude the term.

@cortinico
Copy link
Member

Unrelated to the PR as such - I don't think commits and PRs should include "boy scout" in the title. I think the intention of making that kind of change is great but the commit messages themselves should exclude the term.

+1 on this as the commit message ends up in the changelog. Sometimes I edit PR titles to make them more descriptive, but being more intentional on those would definitely help 👍

@BraisGabin
Copy link
Member Author

Commit message changed :)

@BraisGabin
Copy link
Member Author

Could I get a review here? I think that all the points were fixed already.

@BraisGabin BraisGabin enabled auto-merge (squash) April 2, 2023 08:30
@BraisGabin BraisGabin merged commit 221d701 into main Apr 2, 2023
@BraisGabin BraisGabin deleted the generate-website branch April 2, 2023 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build ci documentation housekeeping Marker for housekeeping tasks and refactorings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants