A MoonBit project health checker for release-ready repositories.
Dependencies
pub(all) struct AnalysisContext {
config : DoctorConfig
inventory : ProjectInventory
manifest : MoonManifest?
package_graph : PackageGraph
} derive(Eq, Debug)fn AnalysisContext::new(config : DoctorConfig, inventory : ProjectInventory, manifest : MoonManifest?, package_graph : PackageGraph) -> AnalysisContextpub(all) struct CliOptions {
target : String
format : OutputFormat
strict : Bool
help : Bool
} derive(Eq, Debug)pub(all) struct CommandRequest {
command : DoctorCommand
target : String
format : OutputFormat
strict : Bool
help : Bool
config_path : String?
profile : String?
} derive(Eq, Debug)pub(all) struct Diagnostic {
severity : Severity
code : String
message : String
detail : String
location : SourceLocation?
remediation : Array[String]
} derive(Eq, Debug)fn Diagnostic::at(severity : Severity, code : String, message : String, detail : String, location : SourceLocation, remediation : Array[String]) -> Diagnosticfn Diagnostic::new(severity : Severity, code : String, message : String, detail : String) -> Diagnosticpub(all) struct DiagnosticQuery {
severity : Severity?
category : RuleCategory?
path_prefix : String?
include_unlocated : Bool
} derive(Eq, Debug)fn DoctorConfig::severity_for(self : DoctorConfig, rule_id : String, default_severity : Severity) -> Severityfn DoctorReport::with_context(root : String, diagnostics : Array[Diagnostic], profile : String, checklist : Array[String]) -> DoctorReportpub(all) struct MarkdownDocument {
path : String
headings : Array[MarkdownHeading]
code_blocks : Array[MarkdownCodeBlock]
links : Array[String]
image_links : Array[String]
command_examples : Array[String]
line_count : Int
} derive(Eq, Debug)fn MarkdownDocument::heading_location(self : MarkdownDocument, expected : String) -> SourceLocation?pub(all) struct MoonManifest {
path : String
fields : Array[ManifestField]
imports : Array[String]
comments : Int
nonempty_lines : Int
} derive(Eq, Debug)fn MoonManifest::new(path : String, fields : Array[ManifestField], imports : Array[String], comments : Int, nonempty_lines : Int) -> MoonManifestpub(all) struct MoonPackage {
path : String
import_path : String
manifest : MoonManifest
source_files : Array[ProjectFile]
test_files : Array[ProjectFile]
} derive(Eq, Debug)fn MoonPackage::new(path : String, import_path : String, manifest : MoonManifest, source_files : Array[ProjectFile], test_files : Array[ProjectFile]) -> MoonPackagefn PackageGraph::new(module_name : String, packages : Array[MoonPackage], local_edges : Map[String, Array[String]], missing_local_imports : Array[(String, String)], cycles : Array[Array[String]]) -> PackageGraphfn ProjectInventory::files_with_suffix(self : ProjectInventory, suffix : String) -> Array[ProjectFile]fn ProjectInventory::new(root : String, files : Array[ProjectFile], directories : Array[String], ignored_paths : Array[String]) -> ProjectInventorypub(all) struct ProjectMetrics {
root : String
total_files : Int
total_directories : Int
total_lines : Int
total_characters : Int
moonbit_source : MetricGroup
moonbit_tests : MetricGroup
markdown_docs : MetricGroup
workflows : MetricGroup
config_files : MetricGroup
fixture_files : MetricGroup
example_files : MetricGroup
package_count : Int
local_dependency_edges : Int
ignored_path_count : Int
} derive(Eq, Debug)fn ProjectSnapshot::new(root : String, files : Map[String, String], dirs : Array[String]) -> ProjectSnapshotpub(all) struct QualityArea {
category : RuleCategory
possible : Int
achieved : Int
errors : Int
warnings : Int
infos : Int
notes : Array[String]
} derive(Eq, Debug)pub(all) struct QualityScorecard {
profile : String
areas : Array[QualityArea]
total_possible : Int
total_achieved : Int
percentage : Int
grade : String
} derive(Eq, Debug)pub(all) struct ReleaseReadiness {
profile : DoctorProfile
module_name : String?
version : String?
repository : String?
license : String?
readme : String?
description : String?
keywords : Array[String]
has_license_file : Bool
has_ci : Bool
has_examples : Bool
has_tests : Bool
has_changelog : Bool
has_contributing : Bool
has_acceptance : Bool
required_commands : Array[String]
} derive(Eq, Debug)pub(all) struct RemediationPlan {
project : String
profile : String
tasks : Array[RemediationTask]
blocking_tasks : Int
advisory_tasks : Int
} derive(Eq, Debug)fn RemediationPlan::new(project : String, profile : String, tasks : Array[RemediationTask]) -> RemediationPlanpub(all) struct RemediationTask {
priority : Int
category : RuleCategory
title : String
actions : Array[String]
rule_ids : Array[String]
blocking : Bool
} derive(Eq, Debug)fn RemediationTask::new(priority : Int, category : RuleCategory, title : String, actions : Array[String], rule_ids : Array[String], blocking : Bool) -> RemediationTaskpub(all) struct ReportBundle {
report : DoctorReport
remediation : RemediationPlan
scorecard : QualityScorecard
text : String
json : String
sarif : String
markdown : String
} derive(Eq, Debug)pub(all) struct RuleDefinition {
id : String
category : RuleCategory
default_severity : Severity
title : String
description : String
remediation : String
profiles : Array[String]
} derive(Eq, Debug)fn RuleDefinition::new(id : String, category : RuleCategory, default_severity : Severity, title : String, description : String, remediation : String, profiles : Array[String]) -> RuleDefinitionpub(all) struct WorkflowFacts {
path : String
name : String?
triggers : Array[String]
permissions : Array[String]
commands : Array[String]
actions : Array[String]
jobs : Array[String]
has_moon_setup : Bool
has_moon_check : Bool
has_moon_build : Bool
has_moon_test : Bool
has_moon_package : Bool
has_artifact_upload : Bool
} derive(Eq, Debug)fn analyze_release_readiness(inventory : ProjectInventory, manifest : MoonManifest?, config : DoctorConfig) -> ReleaseReadinesslet report_json_schema : StringA MoonBit project health checker for release-ready repositories.
Dependencies