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

"Provide documentation" step fails with 'Could not find an option named "sanitize-html".' #1338

Closed
Skycoder42 opened this issue Feb 10, 2024 · 3 comments · Fixed by #1343
Closed

Comments

@Skycoder42
Copy link

When Running pana 0.22.0 on a repository of mine, since the update it fails on the "Provide documentation" step with the error described above. This leads to pana not giving those 10 points to the package. Logs attached below.

Full logs of the step:

## ✗ Provide documentation (10 / 20)
### [x] 0/10 points: 20% or more of the public API has dartdoc comments

ERR:
Could not find an option named "sanitize-html".

Usage: dart doc [arguments] [<directory>]
-h, --help                  Print this usage information.
-o, --output=<directory>    Configure the output directory.
                            (defaults to "doc/api")
    --validate-links        Display warnings for broken links.  Incompatible with --dry-run.
    --dry-run               Try to generate the docs without saving them.

Run "dart help" to see global options.

### [*] 10/10 points: Package has an example

Link to the full CI-Run: https://github.com/Skycoder42/libsodium_dart_bindings/actions/runs/7854362334/job/21435001392
Older Run with pana 0.21.45 that still worked (no code was changed): https://github.com/Skycoder42/libsodium_dart_bindings/actions/runs/7822458790/job/21341540845

Versions:

Flutter 3.16.9 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 41456452f2 (vor 2 Wochen) • 2024-01-25 10:06:23 -0800
Engine • revision f40e976bed
Tools • Dart 3.2.6 • DevTools 2.28.5

Activated pana 0.22.0.
@frknkrc44
Copy link

I have the same problem on my github action

https://github.com/frknkrc44/vcf_dart/actions/runs/7864253209

Analyzed with Pana 0.22.0 (Dart v3.2.3 - Flutter v3.16.4 (stable))

@felangel
Copy link

felangel commented Feb 12, 2024

Same issue in mason_logger:
https://github.com/felangel/mason/actions/runs/7864550647/job/21456428443

Looks like dart doc no longer supports the--sanitize-html option

'--sanitize-html',

@isoos
Copy link
Collaborator

isoos commented Feb 12, 2024

Thanks for reporting.

The core of the issue was a change where an unspecified --dartdoc-version parameter caused the fallback to the SDK's dartdoc - which did not have the --sanitize-html CLI parameter yet. I'm fixing this in #1343.

If you need to have a more urgent fix, use --dartdoc-version 8.0.5 in you CI for the time being.

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 a pull request may close this issue.

4 participants