[QGIS-Developer] Developer Best Practice Suggestions

Nyall Dawson nyall.dawson at gmail.com
Thu Oct 29 15:48:51 PDT 2020


On Wed, 28 Oct 2020 at 23:34, C Hamilton <adenaculture at gmail.com> wrote:
>
> I tried submitting my first QGIS core code submission. See
>
> https://github.com/qgis/QGIS/pull/39655
>
> As I was doing the pull request I found out that there were some scripts that should have been run to check the coding style. Unfortunately, those scripts are .sh scripts and I chose to develop on Windows using Visual Studio and as far as I know there isn't a way to run the scripts.
>
> I am on windows, but would I be better off to use something like virtualbox and create a virtual linux development environment? I'm not as good with linux because I haven't used it for over 10 years.
>
> Is there still a way for me to use the Windows development environment, yet make sure I'm able to run all the required scripts to do the checks?

Yes -- there's two options:

1. (more hassle in the long run) Use cygwin and run the scripts
through that. Make sure that you have the "with_astyle" cmake option
enabled in your build too! Cygwin is easy to install, but it will be a
pain to find all the required dependancies for the prepare commit
script (e..g you'll need to get the perl packages)

2. (harder initially, less hassle in the long run) Install WSL and a
Ubuntu release through that. Run the prepare commit script inside the
Ubuntu shell. WSL takes a through hoops to install, but there's good
guides out there. After you have the Ubuntu shell available it's easy
to install all the required pacakges for the QGIS prepare commit
scripts.

Personally when I'm doing dev on windows I always use the WSL ubuntu
shell now, as it makes git/etc easier to use anyway!

Nyall



>
> How have you set up your QGIS development environment?
>
> My code submission got a red flag with indentation so before I do anything more I really need to figure out the best workflow for doing development.
>
> Thanks,
>
> Calvin
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the QGIS-Developer mailing list