Comments (6)
For reference, for QField clang-format is used with the following options which offer a (IMHO) acceptable compatibility. It's been a while, so maybe nowadays even better things are possible: https://github.com/opengisch/QField/blob/master/.clang-format with https://github.com/opengisch/QField/blob/master/.pre-commit-config.yaml#L43-L47
from qgis-enhancement-proposals.
A big +1 from me.
We've made some tries in the past and I believe we can get close to no-modification of our source files.
The main issue we had was the indent of access modifiers (see https://bugs.llvm.org/show_bug.cgi?id=19056 and https://reviews.llvm.org/D60225) which was finally solved in 2021 (see https://reviews.llvm.org/rG2a42c759ae7bb09dd448d188138f310d014fcab6).
This would mean LLVM 12+ and this is probably acceptable now!
Another point regarding modification of headers is … sipify… As you probably don't want to dig into this, that's a good motivation to stick to our current format :) (just the format, not the tool!)
And that would mean one tool to rule all the branches, otherwise, we'll probably live with astyle with the current branches until they are not maintained anymore and clang-format for the new ones, but that's not a big deal.
from qgis-enhancement-proposals.
+1 to use a simple pre-commit for this kind of task :-)
from qgis-enhancement-proposals.
Precommit looks good, from a few projets using it.
And that would mean one tool to rule all the branches, otherwise, we'll probably live with astyle with the current branches until they are not maintained anymore and clang-format for the new ones, but that's not a big deal.
The backport bot will mainly fail if the formatting is different between active branches so it will require a lof manual backport.
from qgis-enhancement-proposals.
Precommit looks good, from a few projets using it.
And that would mean one tool to rule all the branches, otherwise, we'll probably live with astyle with the current branches until they are not maintained anymore and clang-format for the new ones, but that's not a big deal.
The backport bot will mainly fail if the formatting is different between active branches so it will require a lof manual backport.
Right, I guess we will need to reformat all the "active" branches.
from qgis-enhancement-proposals.
A big +1 from me too. I use it on various projects and it's excellent (especially since it's been stabilized since versions ~ >= 12).
fyi, I've discovered a tool - Clang Format Detector that "promises" to convert file styles to .clang-format
. I don't have a truly satisfactory result yet, but it's pretty close.
from qgis-enhancement-proposals.
Related Issues (20)
- GSSAPI authentication not supported HOT 1
- Support for Complex Features in WFS provider HOT 9
- Authentication system updates HOT 21
- License requirements for plugins on plugins.qgis.org HOT 8
- Indicator on volatile default values
- R QGIS_process integration into JASP HOT 4
- QGIS Enhancement: Allow a simple way to refresh external datasets manually HOT 1
- CMYK Support HOT 22
- A better experience for first time plugin manager users HOT 7
- PyQGIS linter warnings HOT 1
- Move more data providers to core library HOT 15
- QGIS Enhancement: Authentication system revision (v1.1) HOT 3
- Clean up point cloud index and improve its thread safety HOT 2
- QGIS Enhancement Proposal: Mitigate Abusive Tile Fetching on OpenStreetMap (OSM) Servers HOT 11
- QGIS Enhancement Proposal: Implementing CI Qt6 Windows Builds through vcpkg HOT 4
- QGIS Enhancement Proposal: Paged Fetching of Features and Browser Attribute Table Improvements HOT 2
- Fix access to remote data sources in WebAssembly builds HOT 14
- Embedded end-user feedback HOT 6
- Trusted Projects and Folders HOT 12
- Improve UX of Raster Legend in the QGIS Layers Panel
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qgis-enhancement-proposals.