These are some minimal guideliness that pull requests should follow. These are not absolute, but please try do follow this as best you can.
-
Variables should have descriptive names. Names should not be too short. For example, a variable representing discounted price may be called
discountedPriceand notdp. Names should not be too long either, for exampleamountThatWillBeDiscountedFromBillis too much. -
As per C# Conventions, method names should be in Pascal Case, which means the first letter of every word should be capitalized.
-
Interface names should begin with 'I'.
public int ApplyDiscount()
-
Names be some sort of action. So the in the form "verb-noun" is acceptable. For example
GetAllBooks()is better thanAllBooks -
Properties should have their first letter capitalized.
- It would be great to have functions, classes and properties have minimal XML documentation. XML Documentation is written just above the function, class or property and can be auto generated with three slashes(/). For example
///
/// Calcuate the total value of all the products
///
/// The list of products
/// Total bill amount after discount
public decimal ValueProducts(IEnumerable products)
{
}
- The code may also have comments where the steps become too complicated or it may need explaining.
- Try to keep the functions short. If the function is more than 15 lines long, perhaps try splitting into smaller functions. More small functions is much better than fewer big functions. The same goes for classes.
- Each class must have an associated public interface, that it implements.
- Please include a small, one line description of your commit, followed by a more detailed explaination uner it. Be as descriptive as you can.