Skip to content

Commit

Permalink
Clarify coding style guide in a couple places
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiwek committed Jan 31, 2020
1 parent a2b7b32 commit ebc8450
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions devel/contributors/coding-style.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ below.

.. sourcecode:: c++

class MyClass {
> void FunctionWithALongName(int argument1,
> ...........................int argument2)
> > {
Expand All @@ -39,7 +40,7 @@ below.
> > > DoSomethingMore();
> > > }
> > }
}
};

Tabs (represented by ``>``) are used to match indentation levels, and then then
spaces (represented by ``.`` in the cases where they're used for alignment) are
Expand Down Expand Up @@ -119,7 +120,7 @@ Function and Variable Naming
- Class/struct methods should be ``CamelCase``, though some exceptions are
made. For example, Zeek classes that are similar enough to another class
provided by the standard library, ``snake_case`` may be used so they
feel more familiar.
feel more familiar. Non-member functions tend to use ``snake_case``.
- Variable names, including member variables, should always be ``snake_case``.
- Prefer using more descriptive variable names, except for counter variables.

Expand Down

0 comments on commit ebc8450

Please sign in to comment.