Skip to content

Commit

Permalink
add old astyle version, adapt prepare-commit.sh to it and include it …
Browse files Browse the repository at this point in the history
…in the CODING guide

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14597 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Nov 13, 2010
1 parent 0cdfa40 commit f09b9ec
Show file tree
Hide file tree
Showing 12 changed files with 8,233 additions and 12 deletions.
29 changes: 19 additions & 10 deletions CODING
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Base suffix. This identifies the class as a generated base class.


Examples:
QgsPluginMangerBase
QgsPluginManagerBase
QgsUserOptionsBase


Expand Down Expand Up @@ -303,6 +303,13 @@ Braces should start on the line following the expression:
}


There is a scripts/prepare-commit.sh that looks up the changed files and
reindents them using astyle. This should be run before committing.

As newer versions of astyle indent differently than the version used to do a
complete reindentation of the source, the script uses an old astyle version,
that we include in our repository.


1.8. API Compatibility
======================
Expand Down Expand Up @@ -348,10 +355,12 @@ errors, development time, and maintenance.


This will:
* allow changes to be made in one location instead of in multiple places
* help prevent code bloat
* make it more difficult for multiple copies to evolve differences over time,
thus making it harder to understand and maintain for others

- allow changes to be made in one location instead of in multiple places
- help prevent code bloat
- make it more difficult for multiple copies to evolve differences over time,
thus making it harder to understand and maintain for others



1.9.2. Prefer Having Constants First in Predicates
Expand Down Expand Up @@ -660,7 +669,7 @@ a ticket in trac (https://trac.osgeo.org/qgis/) first and then attach you
This makes it easier for us to apply the patches since we don't need to
navigate to a specific place in the source tree to apply the patch. Also when I
receive patches I usually evaluate them using kompare, and having the patch
from the top level dir makes this much easier. Below is an example of you you
from the top level dir makes this much easier. Below is an example of how you
can include multiple changed files into your patch from the top level
directory:

Expand Down Expand Up @@ -689,10 +698,10 @@ patch e.g.

QGIS developers are busy folk. We do scan the incoming patches on bug reports
but sometimes we miss things. Don't be offended or alarmed. Try to identify a
developer to help you - using the ["Project Organigram"] and contact them
developer to help you - using the Project Organigram (http://www.qgis.org/wiki/Project_Organigram) and contact them
asking them if they can look at your patch. If you don't get any response, you
can escalate your query to one of the Project Steering Committee members
(contact details also available on the ["Project Organigram"]).
(contact details also available on the Project Organigram).


2.6.5. Due Diligence
Expand All @@ -709,13 +718,13 @@ under the GPL.

Write access to QGIS source tree is by invitation. Typically when a person
submits several (there is no fixed number here) substantial patches that
demonstrate basic competance and understanding of C++ and QGIS coding
demonstrate basic competence and understanding of C++ and QGIS coding
conventions, one of the PSC members or other existing developers can nominate
that person to the PSC for granting of write access. The nominator should give
a basic promotional paragraph of why they think that person should gain write
access. In some cases we will grant write access to non C++ developers e.g. for
translators and documentors. In these cases, the person should still have
demonstrated ability to submit patches and should ideally have submtted several
demonstrated ability to submit patches and should ideally have submitted several
substantial patches that demonstrate their understanding of modifying the code
base without breaking things, etc.

Expand Down
7 changes: 7 additions & 0 deletions doc/CODING.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,13 @@ Braces should start on the line following the expression:
}
```

There is a scripts/prepare-commit.sh that looks up the changed files and
reindents them using astyle. This should be run before committing.

As newer versions of astyle indent differently than the version used to do a
complete reindentation of the source, the script uses an old astyle version,
that we include in our repository.

== API Compatibility ==

From QGIS 1.0 we will provide a stable, backwards compatible API. This will
Expand Down
2 changes: 2 additions & 0 deletions doc/build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash
txt2tags -o ../INSTALL -t txt INSTALL.t2t
txt2tags -o index.html -t html INSTALL.t2t
txt2tags -o ../CODING -t txt CODING.t2t
txt2tags -o CODING.html -t html CODING.t2t
6 changes: 4 additions & 2 deletions scripts/astyle.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash

if ! type -p astyle >/dev/null; then
ASTYLE=$(dirname $0)/astyle

if ! type -p $ASTYLE >/dev/null; then
echo "astyle not found" >&2
exit 1
fi
Expand Down Expand Up @@ -43,5 +45,5 @@ for f in "$@"; do

flip -ub "$f"
#qgsloggermig.pl "$f"
astyle $ARTISTIC_STYLE_OPTIONS "$f"
$ASTYLE $ARTISTIC_STYLE_OPTIONS "$f"
done
Loading

0 comments on commit f09b9ec

Please sign in to comment.