Skip to content

test: wrong alphabetical order #8

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

Draft
wants to merge 33 commits into
base: gh-action-2
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
45289ab
test: wrong alphabetical order
LuigiImVector Jul 12, 2022
f186b02
test: wrong alphabetical order (double)
LuigiImVector Jul 12, 2022
15a28b2
fix(fpb-lint): every step must define a `uses` or `run` key
LuigiImVector Jul 12, 2022
8e089e3
build(fpb-lint): added else condition
LuigiImVector Jul 12, 2022
06f5245
test: debug order
LuigiImVector Jul 12, 2022
fba3615
fix: added callback function to writeFile()
LuigiImVector Jul 12, 2022
3d697bd
fix: missed parentheses
LuigiImVector Jul 12, 2022
67b9af5
typo
LuigiImVector Jul 12, 2022
5ac50ca
fix: replaced 'writeFile' with 'appendFile'
LuigiImVector Jul 12, 2022
2649a9c
newline
LuigiImVector Jul 12, 2022
a883ef6
build(fpb-lint): cleaned output
LuigiImVector Jul 12, 2022
c658a3b
build(fpb-lint): remove newline from the eof
LuigiImVector Jul 12, 2022
2ea0b80
build(fpb-lint): ignore newlines at the eof
LuigiImVector Jul 12, 2022
691b511
build(fpb-lint): remove newlines at the eof
LuigiImVector Jul 12, 2022
83346dc
fix: use \r\n instead of \n
LuigiImVector Jul 12, 2022
dcbad89
fix
LuigiImVector Jul 12, 2022
6ef2848
test
LuigiImVector Jul 12, 2022
a8652a4
test: two different file with errors
LuigiImVector Jul 12, 2022
3fa3689
fix: removing newlines
LuigiImVector Jul 13, 2022
060f1b9
build(fpb-lint): removed bash code for the for removing newlines ata …
LuigiImVector Jul 13, 2022
30c10bb
test: new cleaning script
LuigiImVector Jul 13, 2022
7272127
fix: properties undefined
LuigiImVector Jul 13, 2022
9f734d9
fix: lastLine undefined
LuigiImVector Jul 13, 2022
0e2fad7
build(fpb-lint): cleaning output using Node.js
LuigiImVector Jul 13, 2022
505b2a5
test: two alphabetical errors fixed
LuigiImVector Jul 13, 2022
2bc611f
test: last alphabetical error fixed
LuigiImVector Jul 13, 2022
62f553e
build: uses two different workflows
LuigiImVector Jul 13, 2022
93de433
typo
LuigiImVector Jul 13, 2022
9e8ddd5
typo folder
LuigiImVector Jul 13, 2022
f81d24f
build(commentPr): use actions/download-artifact@v3
LuigiImVector Jul 13, 2022
987e043
last line
LuigiImVector Jul 13, 2022
21f8908
build(commentPr): stop using action/download-artifact@v3
LuigiImVector Jul 13, 2022
712cd88
test: add new errors :)
LuigiImVector Jul 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 43 additions & 19 deletions .github/workflows/fpb-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Use Github Script
uses: actions/github-script@v6
- name: Use Node.js
uses: actions/setup-node@v3
with:
Expand All @@ -43,42 +41,68 @@ jobs:
fpb-lint ./courses/ &>> output.log || echo "Analyzing..."
fpb-lint ./more/ &>> output.log || echo "Analyzing..."

cat > error.log

- name: Clean output
if: ${{ always() &&
github.event_name == 'pull_request' }}
uses: actions/github-script@v6
with:
script: |
const fs = require('fs');
const readline = require('readline');

const file = readline.createInterface({
input: fs.createReadStream('output.log'),
output: process.stdout,
terminal: false
});

let lastLine = '';
file.on('line', (line) => {
if (line.includes('/home/runner/work/free-programming-books/')) {
fs.writeFile('error.log', line.replace('/home/runner/work/free-programming-books/', ''));
} else if (line.includes('\u26a0')) {
fs.writeFile('error.log', '\n\n');
if (lastLine) {
fs.appendFile('output.log', lastLine, (err) => {
if (err) {
console.error(err);
}
});
}

if (line.includes('warning')) {
console.log(line);
lastLine = '\r\n\r\n';
} else if (line.includes('error')) {
console.log(line);
lastLine = line + '\r\n';
}
});

file.on('close', () => {
if (lastLine === '\r\n\r\n') {
return;
}

fs.appendFile('output.log', lastLine, (err) => {
if (err) {
console.error(err);
}
});
});

- name: Print output
if: ${{ always() &&
github.event_name == 'pull_request' }}
run: |
cat error.log
cat error.log

if [ -s error.log ]
then
gh pr review $PR -r -b "Linter failed, fix the error(s):
\`\`\`
$(cat error.log)
\`\`\`"
gh pr edit $PR --add-label "linter error"
else
gh pr review $PR -a
gh pr edit $PR --remove-label "linter error"
fi
if [ -s error.log ]
then
gh pr review $PR -r -b "Linter failed, fix the error(s):
\`\`\`
$(cat error.log)
\`\`\`"
gh pr edit $PR --add-label "linter error"
else
gh pr review $PR -a
gh pr edit $PR --remove-label "linter error"
fi
2 changes: 1 addition & 1 deletion books/free-programming-books-es.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
### 0 - Meta-Listas

* [Aprender Python](https://wiki.python.org.ar/aprendiendopython/) - Python Argentina
* [Apuntes Completos de Desarrollo Web](http://jorgesanchez.net) - Jorge Sánchez
* [BApuntes Completos de Desarrollo Web](http://jorgesanchez.net) - Jorge Sánchez
* [Asombroso DDD: Una lista curada de recursos sobre Domain Driven Design](https://github.com/ddd-espanol/asombroso-ddd)
* [Desarrollo de Aplicaciones Web - Temario Completo](https://github.com/statickidz/TemarioDAW#temario-daw) - José Luis Comesaña (GitHub)
* [Desarrollo de Aplicaciones Web y Sistemas Microinformáticos y Redes](https://javiergarciaescobedo.es) - Javier García Escobedo
Expand Down
4 changes: 2 additions & 2 deletions courses/free-courses-it.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@
* [Automi e Linguaggi Formali](https://www.youtube.com/playlist?list=PLhEwqlL10MqNz1pA7R5jnB_gsMIhDOe5X) - Bresolin e Filè (Università di Padova)
* [Fondamenti di Informatica](https://www.youtube.com/playlist?list=PLUL1bzfXcbX3g2cIcTFdmvj5yawQtUOxJ) - C. De Stefano (Università di Cassino e del Lazio Meridionale)
* [Informatica](https://didattica.polito.it/pls/portal30/sviluppo.videolezioni.vis?cor=232) - M. Mezzalama (Politecnico di Torino)
* [Informatica di Base - Corso intensivo](https://www.youtube.com/playlist?list=PLG31HS6yEI8dv6TUmv9w0W6YmEAQm0P2q) - G. Pellegrini Parisi
* [AInformatica di Base - Corso intensivo](https://www.youtube.com/playlist?list=PLG31HS6yEI8dv6TUmv9w0W6YmEAQm0P2q) - G. Pellegrini Parisi
* [Informatica I - Modelli dell'Informatica](https://www.youtube.com/playlist?list=PLAQopGWlIcyalkb2baN9mnotsdBm5Vbkc) - A. Marchetti Spaccamela (Università La Sapienza Università di Roma)
* [Sistemi di Calcolo](https://www.youtube.com/playlist?list=PLAQopGWlIcybT12h7fjVvlGAeSqOKDnTA) - C. Demetrescu (Università La Sapienza di Roma)
* [Teoria dell'informazione](https://www.youtube.com/playlist?list=PL0qAPtx8YtJeGo5g4Esi7tm6kHPRivkvb) (F. Camuso)


### Java

* [Algoritmi e Strutture Dati Java](http://www.vitoantoniobevilacqua.it/wiki/index.php?title=Pagina_principale#Dispense_di_Algoritmi_e_Strutture_Dati_in_Java) - V. Bevilacqua (Politecnico di Bari)
* [BAlgoritmi e Strutture Dati Java](http://www.vitoantoniobevilacqua.it/wiki/index.php?title=Pagina_principale#Dispense_di_Algoritmi_e_Strutture_Dati_in_Java) - V. Bevilacqua (Politecnico di Bari)
* [Api Rest vs GraphQL: La mini-serie per gli impazienti](https://www.youtube.com/playlist?list=PL2zaZp2LZxlv2XxmLm4dGP1tHfMjj7-kN) - (D. Balinzo)
* [Corso di Java Spring Framework](https://www.youtube.com/playlist?list=PLCbSCJEIR6CqgCLyVzqp49xOm8A5YDTKA) - Mauro Cicolella
* [Design Patterns in Java](https://www.youtube.com/playlist?list=PLCbSCJEIR6Cq-ac90TGvJ8Wo8TtyZ4nhu) (M. Cicolella)
Expand Down