aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-20 02:17:14 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-20 02:17:14 +0000
commit518c7684e1f17d8e15d648a924238b687bc441a9 (patch)
tree164f7120f83bb6d0dcea91357100508a95bc5f2c
parent81e10024fc3ab2d8e6e4b6fed899b4e985b1a98d (diff)
downloadpaludis-518c7684e1f17d8e15d648a924238b687bc441a9.tar.gz
paludis-518c7684e1f17d8e15d648a924238b687bc441a9.tar.xz
Move CODING_STANDARDS into Doxygen
-rw-r--r--CODING_STANDARDS53
-rw-r--r--Makefile.am2
-rw-r--r--doc/Makefile.am3
-rw-r--r--doc/doc_coding_standards.doxygen58
-rw-r--r--doc/doc_mainpage.doxygen3
5 files changed, 64 insertions, 55 deletions
diff --git a/CODING_STANDARDS b/CODING_STANDARDS
deleted file mode 100644
index 484a289..0000000
--- a/CODING_STANDARDS
+++ /dev/null
@@ -1,53 +0,0 @@
-Coding Standards for Paludis
-============================
-
-These are rough guidelines. You should stick to these unless there's a good
-reason to do otherwise. There are lots more standards that aren't documented
-here yet -- ask for clarification as necessary.
-
-Indenting, Spacing
-------------------
-
-Indents are four spaces. There are no tabs anywhere. Braces go on a line of
-their own, and may be omitted if the clarity of the code isn't affected.
-
-Function calls have no space before or after the parentheses. Most operators and
-built-in functions have spaces before the opening parenthesis but not inside.
-
-For example::
-
- if (some_function("moo", 2))
- do_stuff("moo");
- else
- {
- /* this needs some explanation */
- while (0 != do_other_stuff(foo))
- ++foo;
- }
-
-
-Naming
-------
-
-Types are named in MixedCaseNoUnderscores. Variables and functions are named in
-lower_case_with_underscores. Private member variables that aren't going to end
-up being used anywhere external are _prefixed_with_underscore. Template values
-are suffixed_with_underscore_, and template typenames are SuffixedAsWell_ (and
-use typename rather than class). The files for SomeClass (and any small related
-utilities) would be some_class.hh and some_class.cc . Macros are UPPER_CASE, but
-they're evil so don't use them.
-
-Namespaces
-----------
-
-Everything under paludis/ should be inside namespace paludis. Sometimes
-sub-namespaces are used where they look useful.
-
-Never use using namespace std.
-
-Include Guards
---------------
-
-Include guards are #define PALUDIS_GUARD_FILE_NAME_HH 1 .
-
-.. vim: set spell spelllang=en tw=80 et sts=4 sw=4 :
diff --git a/Makefile.am b/Makefile.am
index 76807e7..5b2565f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@ CLEANFILES = *~
MAINTAINERCLEANFILES = Makefile.in configure config/* aclocal.m4 \
config.h config.h.in INSTALL COPYING
AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
-EXTRA_DIST = autogen.bash CODING_STANDARDS
+EXTRA_DIST = autogen.bash
SUBDIRS = misc test paludis src doc
doxygen :
diff --git a/doc/Makefile.am b/doc/Makefile.am
index c601740..4594458 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -3,7 +3,8 @@ MAINTAINERCLEANFILES = Makefile.in
docfiles = \
doc_main.doxygen \
- doc_mainpage.doxygen
+ doc_mainpage.doxygen \
+ doc_coding_standards.doxygen
EXTRA_DIST = doxygen.conf.in $(docfiles)
diff --git a/doc/doc_coding_standards.doxygen b/doc/doc_coding_standards.doxygen
new file mode 100644
index 0000000..3892923
--- /dev/null
+++ b/doc/doc_coding_standards.doxygen
@@ -0,0 +1,58 @@
+/* vim: set ft=cpp tw=80 sw=4 et : */
+
+/** \page CodingStandards Coding Standards
+ *
+ * These are rough guidelines. You should stick to these unless there's a good
+ * reason to do otherwise. There are lots more standards that aren't documented
+ * here yet -- ask for clarification as necessary.
+ *
+ * \section CodingStandardsIndentingAndSpacing Indenting and Spacing
+ *
+ * Indents are four spaces. There are no tabs anywhere. Braces go on a line of
+ * their own, and may be omitted if the clarity of the code isn't affected.
+ *
+ * Function calls have no space before or after the parentheses. Most operators
+ * and built-in functions have spaces before the opening parenthesis but not
+ * inside.
+ *
+ * For example::
+\code
+if (some_function("moo", 2))
+ do_stuff("moo");
+else
+{
+ // this needs some explanation
+ while (0 != do_other_stuff(foo))
+ ++foo;
+}
+\endcode
+ *
+ * \section CodingStandardsNaming Naming
+ *
+ * Types are named in MixedCaseNoUnderscores.
+ *
+ * Variables and functions are named in lower_case_with_underscores.
+ *
+ * Private member variables that aren't going to end up being used anywhere
+ * external are _prefixed_with_underscore.
+ *
+ * Template values are suffixed_with_underscore_, and template typenames are
+ * SuffixedAsWell_ (and use typename rather than class).
+ *
+ * The files for SomeClass (and any small related utilities) would be
+ * some_class.hh and some_class.cc .
+ *
+ * Macros are PALUDIS_UPPER_CASE, but they're evil so don't use them.
+ *
+ * \section CodingStandardsNamespaces Namespaces
+ *
+ * Everything under paludis/ should be inside namespace paludis. Sometimes
+ * sub-namespaces are used where they look useful.
+ *
+ * Never use using namespace std.
+ *
+ * \section CodingStandardsIncludeGuards Include Guards
+ *
+ * Include guards are \#define PALUDIS_GUARD_FILE_NAME_HH 1 .
+ *
+ */
diff --git a/doc/doc_mainpage.doxygen b/doc/doc_mainpage.doxygen
index e5f43e7..b098d77 100644
--- a/doc/doc_mainpage.doxygen
+++ b/doc/doc_mainpage.doxygen
@@ -21,6 +21,9 @@
* The <a href="modules.html">Modules</a> link in the header bar will probably
* be of more use than any of the full class lists.
*
+ * You should also read \link CodingStandards the Coding Standards \endlink
+ * before tinkering.
+ *
* \section userdocs For End Users
*
* You shouldn't be touching paludis at the moment. Go away.