View Issue Details

IDProjectCategoryView StatusLast Update
0003206Project Tools & WebsitesGeneralpublic2022-02-06 23:10
ReporterKunda1 Assigned ToKunda1  
PrioritylowSeverityfeatureReproducibilityN/A
Status assignedResolutionopen 
Target Version0.20 
Summary0003206: TravisCI to run code linting to report trailing whitespace/tabs + LF line endings
DescriptionRecently @wmayer expressed a way to remove trailing whitespaces and tabs in FC code. We could also think about avoiding more of them from being introduced in to source via testing when a PR is submitted.

Tags#pending, TravisCI, unit-test
FreeCAD Information

Relationships

related to 0003205 closed Project Tools & Websites TravisCI to check spelling of submitted Pull Requests to FC repo 
related to 0001352 new FreeCAD DOS line endings makes applying patches on Linux really hard 

Activities

berndhahnebach

2017-10-08 07:16

developer   ~0010262

Last edited: 2017-10-08 07:17

How did he do this?


AFAIK FEM is be free of trailing whitespaces and tabs. I remove them manually. For tabs I use:

grep -rl --exclude=\*.{qm,fcstd,png} $'\t' ./src/Mod/Fem/

Would be cool if we could include this in travis and step by step add any clean source directory of FreeCAD to it.

From my point it should be before any start of compiling on travis.

bernd

Kunda1

2017-10-09 19:27

administrator   ~0010274

Here's a tut on Howto Automatically fix PEP-8 issues using Travis-CI
Just can show us how to implement something in to travis

Kunda1

2017-10-14 18:41

administrator   ~0010297

Cause TravisCI to fail on any trailing whitespace
https://coderwall.com/p/h988xa/cause-travis-to-fail-on-trailing-whitespace
Add this to the script: section of .travis.yml
- "! git grep ' $' -- \\*.rb \\*.js \\*.other-file-types | grep -v -e 'FILE_TO_IGNORE' -e 'OTHER_FILE_TO_IGNORE"

Kunda1

2017-10-16 14:27

administrator   ~0010301

@wmayer what do you think would be a good outcome if a PR is found to have trailing whitespace? Should it kill the build process and report to the user where the whitespace is?

wmayer

2017-10-17 18:12

administrator   ~0010311

> what do you think would be a good outcome if a PR is found to have trailing whitespace?
Detecting a trailing whitespace would be good but it should not abort the build process.

Kunda1

2017-11-10 14:25

administrator   ~0010405

FFmpeg has a cool script that checks patches:
https://github.com/FFmpeg/FFmpeg/blob/master/tools/patcheck

chennes

2021-12-17 03:54

administrator   ~0016109

This can probably be handled via GitHub Actions now.

Kunda1

2022-01-24 18:04

administrator   ~0016270

A volunteer is working on this now

Kunda1

2022-02-06 23:10

administrator   ~0016369

'Floriansimmer' https://github.com/FreeCAD/FreeCAD/pull/5314#issuecomment-1019503744

yorik

2022-03-03 13:55

administrator   ~0016566

This ticket has been migrated to GitHub as issue 5731.

Issue History

Date Modified Username Field Change
2017-10-01 12:29 Kunda1 New Issue
2017-10-01 12:29 Kunda1 Tag Attached: TravisCI
2017-10-01 13:44 Kunda1 Tag Attached: unit-test
2017-10-01 20:11 Kunda1 Relationship added related to 0003205
2017-10-01 20:39 Kunda1 Status new => assigned
2017-10-01 20:39 Kunda1 Assigned To => Kunda1
2017-10-08 07:16 berndhahnebach Note Added: 0010262
2017-10-08 07:17 berndhahnebach Note Edited: 0010262
2017-10-08 07:17 berndhahnebach Note Edited: 0010262
2017-10-08 07:17 berndhahnebach Note Edited: 0010262
2017-10-08 07:17 berndhahnebach Note Edited: 0010262
2017-10-09 19:27 Kunda1 Note Added: 0010274
2017-10-14 18:41 Kunda1 Note Added: 0010297
2017-10-16 14:27 Kunda1 Note Added: 0010301
2017-10-17 18:12 wmayer Note Added: 0010311
2017-10-19 13:10 Kunda1 Relationship added related to 0001352
2017-10-19 13:11 Kunda1 Summary TravisCI to run code linting to report trailing whitespace/tabs => TravisCI to run code linting to report trailing whitespace/tabs + LF line endings
2017-11-10 14:25 Kunda1 Note Added: 0010405
2017-11-12 17:26 Kunda1 Relationship added child of 0003259
2021-02-06 06:36 abdullah Target Version => 0.20
2021-12-17 03:54 chennes Note Added: 0016109
2022-01-23 00:16 Kunda1 Relationship deleted child of 0003259
2022-01-24 18:04 Kunda1 Note Added: 0016270
2022-01-24 18:06 Kunda1 Tag Attached: #pending
2022-02-06 23:10 Kunda1 Note Added: 0016369