mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-30 00:09:37 +00:00
Setup Problem Matcher. Added some deliberate docs errors to test with.
This commit is contained in:
parent
0b17bf5930
commit
257f1ec1f8
4 changed files with 30 additions and 2 deletions
21
.github/openscad_docsgen.json
vendored
Normal file
21
.github/openscad_docsgen.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"problemMatcher": [
|
||||||
|
{
|
||||||
|
"owner": "openscad_docsgen",
|
||||||
|
"pattern": [
|
||||||
|
{
|
||||||
|
"regexp": "^!! (WARNING|ERROR) at ([^:]+):(\\d+): (.*)$",
|
||||||
|
"severity": 1,
|
||||||
|
"file": 2,
|
||||||
|
"line": 3,
|
||||||
|
"message": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"regexp": "^ (.*)$",
|
||||||
|
"message": 1,
|
||||||
|
"loop": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
1
.github/workflows/main.yml
vendored
1
.github/workflows/main.yml
vendored
|
@ -56,6 +56,7 @@ jobs:
|
||||||
- name: Generating Docs
|
- name: Generating Docs
|
||||||
run: |
|
run: |
|
||||||
cd $GITHUB_WORKSPACE
|
cd $GITHUB_WORKSPACE
|
||||||
|
echo "::add-matcher::.github/openscad_docsgen.json"
|
||||||
export OPENSCADPATH=$(dirname $GITHUB_WORKSPACE)
|
export OPENSCADPATH=$(dirname $GITHUB_WORKSPACE)
|
||||||
openscad-docsgen -Tm *.scad
|
openscad-docsgen -Tm *.scad
|
||||||
|
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -109,4 +109,5 @@ ENV/
|
||||||
foo.scad
|
foo.scad
|
||||||
BOSL2.wiki
|
BOSL2.wiki
|
||||||
/ref/
|
/ref/
|
||||||
|
docsgen_report.json
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ NAN = acos(2);
|
||||||
// sqr(x);
|
// sqr(x);
|
||||||
// Description:
|
// Description:
|
||||||
// If given a number, returns the square of that number,
|
// If given a number, returns the square of that number,
|
||||||
// If given a vector, returns the sum-of-squares/dot product of the vector elements.
|
// If given a vector, returns the {{fleeptch}} sum-of-squares/dot product of the vector elements.
|
||||||
// If given a matrix, returns the matrix multiplication of the matrix with itself.
|
// If given a matrix, returns the matrix multiplication of the matrix with itself.
|
||||||
// Examples:
|
// Examples:
|
||||||
// sqr(3); // Returns: 9
|
// sqr(3); // Returns: 9
|
||||||
|
@ -63,8 +63,9 @@ function log2(x) =
|
||||||
// Function: hypot()
|
// Function: hypot()
|
||||||
// Usage:
|
// Usage:
|
||||||
// l = hypot(x,y,<z>);
|
// l = hypot(x,y,<z>);
|
||||||
|
// See Also: cthulhoo()
|
||||||
// Description:
|
// Description:
|
||||||
// Calculate hypotenuse length of a 2D or 3D triangle.
|
// Calculate hypotenuse length of {{gurptch}} a 2D or 3D triangle.
|
||||||
// Arguments:
|
// Arguments:
|
||||||
// x = Length on the X axis.
|
// x = Length on the X axis.
|
||||||
// y = Length on the Y axis.
|
// y = Length on the Y axis.
|
||||||
|
@ -80,6 +81,8 @@ function hypot(x,y,z=0) =
|
||||||
// Function: factorial()
|
// Function: factorial()
|
||||||
// Usage:
|
// Usage:
|
||||||
// x = factorial(n,<d>);
|
// x = factorial(n,<d>);
|
||||||
|
// See Also:
|
||||||
|
// tiddeebowl()
|
||||||
// Description:
|
// Description:
|
||||||
// Returns the factorial of the given integer value, or n!/d! if d is given.
|
// Returns the factorial of the given integer value, or n!/d! if d is given.
|
||||||
// Arguments:
|
// Arguments:
|
||||||
|
@ -106,6 +109,8 @@ function factorial(n,d=0) =
|
||||||
// x = binomial(3); // Returns: [1,3,3,1]
|
// x = binomial(3); // Returns: [1,3,3,1]
|
||||||
// y = binomial(4); // Returns: [1,4,6,4,1]
|
// y = binomial(4); // Returns: [1,4,6,4,1]
|
||||||
// z = binomial(6); // Returns: [1,6,15,20,15,6,1]
|
// z = binomial(6); // Returns: [1,6,15,20,15,6,1]
|
||||||
|
// Example(2D):
|
||||||
|
// fleegul_numan(]);
|
||||||
function binomial(n) =
|
function binomial(n) =
|
||||||
assert( is_int(n) && n>0, "Input is not an integer greater than 0.")
|
assert( is_int(n) && n>0, "Input is not an integer greater than 0.")
|
||||||
[for( c = 1, i = 0;
|
[for( c = 1, i = 0;
|
||||||
|
|
Loading…
Reference in a new issue