Skip to content

Commit

Permalink
dtf: enforcing line lengths
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Kleinman committed Apr 22, 2013
1 parent 086a573 commit d7fc461
Show file tree
Hide file tree
Showing 35 changed files with 530 additions and 341 deletions.
6 changes: 4 additions & 2 deletions dtf/cases/tree_line_length.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from dtf.cases import DtfCase
from dtf.utils import expand_tree

from line_length import DtfLineLength

class DtfTreeLineLength(DtfLineLength):
Expand All @@ -30,10 +30,12 @@ def render_source_tree(self):
return output

def check_directory(self, p=None):
p = True
for source_file in self.render_source_tree():
result = self.check_file(source_file)

if result[0] is False:
p = False
failing = source_file
break
else:
Expand All @@ -42,7 +44,7 @@ def check_directory(self, p=None):

if p is False:
return False, failing, result[1]
else:
elif p is True:
return True, None, None


Expand Down
7 changes: 7 additions & 0 deletions dtf/line-length-administration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: 'administration/ line length'
type: tree_line_length
directory: 'source/administration/'
extension: 'txt'
max_length: 81
exceptions:
- source/administration/production-notes.txt
8 changes: 8 additions & 0 deletions dtf/line-length-applications.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: 'applications/ line length'
type: tree_line_length
directory: 'source/applications/'
extension: 'txt'
max_length: 80
exceptions:
- source/applications/geospatial-indexes.txt
- source/applications/drivers.txt
14 changes: 14 additions & 0 deletions dtf/line-length-core.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'core/ line length'
type: tree_line_length
directory: 'source/core/'
extension: 'txt'
max_length: 81
exceptions:
- source/core/security.txt
- source/core/master-slave.txt
- source/core/replication.txt
- source/core/import-export.txt
- source/core/data-modeling.txt
- source/core/2dsphere.txt
- source/core/geohaystack.txt
- source/core/2d.txt
27 changes: 27 additions & 0 deletions dtf/line-length-includes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: 'include file line length'
type: tree_line_length
directory: 'source/includes/'
extension: 'rst'
max_length: 81
exceptions:
- source/includes/table-sql-to-mongo-delete-examples.rst
- source/includes/install-curl-release-ent-rhel6.rst
- source/includes/table-sql-to-mongo-insert-examples.rst
- source/includes/table-geospatial-queries.rst
- source/includes/table-mongodb-extended-json.rst
- source/includes/table-sql-to-agg-terms.rst
- source/includes/install-curl-release-ent-amz.rst
- source/includes/table-sql-to-mongo-update-examples.rst
- source/includes/install-curl-release-osx-64.rst
- source/includes/install-curl-release-ent-ubuntu11.rst
- source/includes/install-curl-release-ent-ubuntu12.rst
- source/includes/table-index-nav.rst
- source/includes/table-sql-to-mongo-select-examples.rst
- source/includes/install-curl-release-linux-64.rst
- source/includes/table-sql-to-agg-examples.rst
- source/includes/install-curl-release-linux-32.rst
- source/includes/install-curl-release-ent-suse.rst
- source/includes/note-rs-conf-array-index.rst
- source/includes/table-sql-to-mongo-schema-examples.rst
- source/includes/table-sql-to-mongo-terms.rst
- source/includes/table-lock-behavior-per-operation.rst
23 changes: 12 additions & 11 deletions source/administration/configuration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ among all members of the set. Consider the following:
Use descriptive names for sets. Once configured use the
:program:`mongo` shell to add hosts to the replica set.

.. seealso:: :ref:`Replica set reconfiguration <replica-set-reconfiguration-usage>`.
.. seealso:: :ref:`Replica set reconfiguration
<replica-set-reconfiguration-usage>`.

To enable authentication for the :term:`replica set`, add the
following option:
Expand All @@ -188,9 +189,9 @@ following option:
<replica-set-reconfiguration-usage>`" section for information regarding
the process for changing replica set during operation.

Additionally, consider the ":ref:`Replica Set Security <replica-set-security>`"
section for information on configuring authentication with replica
sets.
Additionally, consider the ":ref:`Replica Set Security
<replica-set-security>`" section for information on configuring
authentication with replica sets.

Finally, see the ":doc:`/replication`" index and the
":doc:`/core/replication`" document for more information on
Expand Down Expand Up @@ -241,11 +242,11 @@ Finally, to establish the cluster, configure at least one
configdb = 10.8.0.12:27001
chunkSize = 64

You can specify multiple :setting:`configdb` instances by
specifying hostnames and ports in the form of a comma separated
list. In general, avoid modifying the :setting:`chunkSize` from
the default value of 64, [#chunksize]_ and *should* ensure this setting is consistent
among all :program:`mongos` instances.
You can specify multiple :setting:`configdb` instances by specifying
hostnames and ports in the form of a comma separated list. In general,
avoid modifying the :setting:`chunkSize` from the default value of 64,
[#chunksize]_ and *should* ensure this setting is consistent among all
:program:`mongos` instances.

.. [#chunksize] :term:`Chunk` size is 64 megabytes by default, which
provides the ideal balance between the most even distribution of
Expand Down Expand Up @@ -338,8 +339,8 @@ needed:
Each additional level ``v`` adds additional verbosity to the
logging. The ``verbose`` option is equal to ``v = true``.

- :setting:`diaglog` enables :term:`diagnostic logging <diagnostic log>`. Level ``3``
logs all read and write options.
- :setting:`diaglog` enables :term:`diagnostic logging
<diagnostic log>`. Level ``3`` logs all read and write options.

- :setting:`objcheck` forces :program:`mongod` to validate all
requests from clients upon receipt. Use this option to ensure that
Expand Down
Loading

0 comments on commit d7fc461

Please sign in to comment.