Skip to content

Latest commit

 

History

History
69 lines (49 loc) · 1.81 KB

CONTRIBUTING.md

File metadata and controls

69 lines (49 loc) · 1.81 KB

Contributing

The best way to improve nomacs is your contribution. You can submit simple changes such as formatting corrections, extend manuals and READMEs where appropriate, translate nomacs, donate, fix bugs, or submit new features.

If you contribute source code, you should fork and then clone nomacs:

git clone git@github.com:your-username/nomacs.git
  • Build nomacs on your machine.
  • Make your changes.
  • Commit in small chunks (one feature/bug fix per commit).
  • Push to your fork and submit a pull request.

We will comment on pull requests within one week. Here are some things that increase the chances of your PR being accepted:

  • Write good commit messages.
  • Follow our style guide.
  • Don't break the Travis build.

Style

nomacs might have a weird coding style at the first glance, however we try to follow at least some rules:

  • using namespace is prohibited (even for std)
  • Naming
    • Class names start with a capital letter (i.e. DkBaseManipulator).
    • Methods start with lowercase (i.e. name()).
    • Prefix members with an m (i.e. int mAction = 0).
    • Prefix classes with Dk.
  • format C++ sources with clang-format -i --style=file your_contribution.cpp
  • Encapsulate everything with the namespace nmc

Right:

namespace nmc
{

class DllCoreExport DkBaseManipulator
{
public:
    DkBaseManipulator(QAction *action = 0);

    QString name() const;

private:
    QAction *mAction = 0;
};

}

Wrong:

class DllCoreExport baseManipulator
{

public:
  baseManipulator(QAction* Action = 0);

  QString Name() const;

private:
  QAction* action = 0;
};