Skip to content

Define coding style and conventions #26

@philliplbryant

Description

@philliplbryant

I'm trying to use the same code style and conventions as the current code base, but those conventions aren't always clear. If a well known convention is used, or is documented elsewhere, it would be helpful to provide a link to the documentation.

If the conventions are not documented, or cannot be easily defined, another option is to add a few project files from IntelliJ and/or Eclipse. While these files might not help those who do not use one of these IDEs, it would be beneficial to others.

A cursory search for suggested IntelliJ project files (also confirmed by my team's use of them), indicates adding the following files will help enforce styles and conventions without affecting other preferences:

.idea
 codeStyles
  codeStyleConfig.xml
  Project.xml
 insectionProfiles
  Project_Default.xml
 codeStyleSettings.xml
 encodings.xml

We would probably want to update .gitignore to include the following entries as well.

# Ignore all files in the .idea directory by default
/.idea/*

# Ignore contents of directories, then unignore specific files
/.idea/codeStyles/*
!/.idea/codeStyles/codeStyleConfig.xml
!/.idea/codeStyles/Project.xml

/.idea/inspectionProfiles/*
!/.idea/inspectionProfiles/Project_Default.xml

!/.idea/encodings.xml

I could certainly add these files, but then the project would use my conventions, which might not be the preferred convention.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions