From 041505723038b51ef3e8998aea95e63185baeda8 Mon Sep 17 00:00:00 2001 From: Simon Exner <43469235+0815Creeper@users.noreply.github.com> Date: Fri, 13 Sep 2024 16:58:25 +0200 Subject: [PATCH] added documenter to gh-ci-warning conversion --- docs/Project.toml | 1 + docs/make.jl | 20 +++++++++++++++++++- src/FMI.jl | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/docs/Project.toml b/docs/Project.toml index 212806db..90fc4824 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -9,6 +9,7 @@ JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819" JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899" MAT = "23992714-dd62-5051-b70f-ba57cb901cac" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" +Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb" [compat] julia = "1.6" diff --git a/docs/make.jl b/docs/make.jl index e5489340..25a96119 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -7,6 +7,7 @@ import Pkg; Pkg.develop(path = joinpath(@__DIR__, "../../FMI.jl")); using Documenter, Plots, JLD2, DataFrames, CSV, MAT, FMI, FMIBase, FMIImport, FMICore using Documenter: GitHubActions +using Suppressor example_pages = [ "Overview" => "examples/overview.md", @@ -21,7 +22,7 @@ example_pages = [ "Pluto Workshops" => "examples/workshops.md", ] -makedocs( +my_makedocs() = makedocs( sitename = "FMI.jl", format = Documenter.HTML( collapselevel = 1, @@ -88,6 +89,23 @@ function deployConfig() return GitHubActions(github_repository, github_event_name, github_ref) end +output = "" +try + global output = @capture_err begin + my_makedocs() + end; +catch e + my_makedocs() # if it fails, re-run without capturing, so that its stderr appears in the console/logs +end + +# errors = findall(r"Error:.*", output) +warns = findall(r"Warning:.*", output) + +for w in warns + s = string("::warning title=Documenter-Warning::",output[w],"\r\n") + print(s) +end + deploydocs( repo = "github.com/ThummeTo/FMI.jl.git", devbranch = "main", diff --git a/src/FMI.jl b/src/FMI.jl index 9478f771..3cfdeba6 100644 --- a/src/FMI.jl +++ b/src/FMI.jl @@ -10,7 +10,7 @@ module FMI # reexport using FMIImport.FMIBase.Reexport @reexport using FMIImport -@reexport using FMIImport.FMIBase +@reexport using FMIImport.FMIBase @reexport using FMIImport.FMIBase.FMICore @reexport using FMIExport