This repository has been archived by the owner on Nov 8, 2018. It is now read-only.
forked from peacecorps/PCSA
-
Notifications
You must be signed in to change notification settings - Fork 104
PR Best Practices
Dinu Kumarasiri edited this page Nov 27, 2016
·
5 revisions
When you are creating a new class or a method, do not forget to add class/method comments according to the following structure.
/*
* Proper comment on the class like what it does and
* if there are design level description
*
* @author <Authorname>
* @since 2016-03-29
*/
/**
* Returns an Image object that can then be painted on the screen.
* The url argument must specify an absolute {@link URL}. The name
* argument is a specifier that is relative to the url argument.
* <p>
* This method always returns immediately, whether or not the
* image exists. When this applet attempts to draw the image on
* the screen, the data will be loaded. The graphics primitives
* that draw the image will incrementally paint on the screen.
*
* @param url an absolute URL giving the base location of the image
* @param name the location of the image, relative to the url argument
* @return the image at the specified URL
* @see Image
*/
public Image getImage(URL url, String name) {
try {
return getImage(new URL(url, name));
} catch (MalformedURLException e) {
return null;
}
}
* res/ -> drawable/ Bitmap files (.png, .9.png, .jpg, .gif) or XML files that are compiled into the following drawable resource subtypes:
- Bitmap files
- Nine-Patches (re-sizable bitmaps)
- State lists
- Shapes
- Animation drawables
- Other drawables
* res/ -> mipmap/ Drawable files for different launcher icon densities.
- Use meaningful commit messages
- Do not over commit. (Do not include multiple commits for a small change)
- Do not add the merge commits to the PR
- Usually use a single commit for a single issue, unless the issues are related or contain a significant code change.
- There are certain kind of files you do not add to source control. If you already don't know about them, please do a quick search and find them and remove them from your commit.
- When sending a PR have an appropriate title referencing the issue which it solves.
- If it is a UI change, add a screen shot of the new/fixed UI.
- Have a short description on what has gone wrong (like a root cause analysis and description of the fix), if that information is not already present in the issue.
- Do not ask us to review it in a separate comment. We will review it anyway.