florianschanda / miss_hit

MATLAB Independent, Small & Safe, High Integrity Tools - code formatter and more
GNU General Public License v3.0
160 stars 21 forks source link

GitLab/GitHub links support in generated HTML #204

Closed EmilyGraceSeville7cf closed 3 years ago

EmilyGraceSeville7cf commented 3 years ago

What kind of feature is this?

MISS_HIT component affected Choose one or more of the below:

Describe the solution you'd like Now the following command:

mh_style --html report file_name.m

produces smth like this:

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="file:../../../../../../../../home/Alvin/.local/bin/docs/style.css">
<title>MISS_HIT Report</title>
</head>
<body>
<header>MISS_HIT Report</header>
<main>
<div></div>
<h1>Issues identified</h1>
<section>
<h2>Secant method.m</h2>
<div class="message"><a href="matlab:opentoline('Secant method.m', 1)">Secant method.m: line 1:</a> lex error: unexpected character &#x27;#&#x27;</div>
<div class="message"><a href="matlab:opentoline('Secant method.m', 1, 81)">Secant method.m: line 1:</a> style: line exceeds 80 characters</div>
</section>
</main>
</body>
</html>

But what if I want to use it in my CI in GitLab/GitHub? Maybe it is a good idea to add --gitlab-ci and --github-ci options to refer to code string in GitLab/GitHub repo.

florianschanda commented 3 years ago

You mean instead of the matlab:opentoline stuff? Can you please give me an example of what you'd like instead?

florianschanda commented 3 years ago

Or, would you like MISS_HIT to use the GitHub/GitLab API to post review comments on your code?

EmilyGraceSeville7cf commented 3 years ago

You mean instead of the matlab:opentoline stuff? Can you please give me an example of what you'd like instead?

Yes. Example: https://gitlab.com/dvfu-university/calculus/testci/-/blob/master/main.m#L15.

florianschanda commented 3 years ago

I see a few issues with this, maybe you have a good idea on resolving this:

florianschanda commented 3 years ago

@alvinseville7cf since I didn't hear anything here for 2 weeks I am closing this ticket. Please re-open if you have an idea specifically for my second question.