Skip to content

Commit

Permalink
Initial configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
prmr committed Jan 6, 2016
1 parent 4c82609 commit 46e5f91
Show file tree
Hide file tree
Showing 10 changed files with 834 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .checkstyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>

<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
<local-check-config name="COMP303 Checks" location="style/Style.xml" type="project" description="">
<additional-data name="protect-config-file" value="false"/>
</local-check-config>
<fileset name="all" enabled="true" check-config-name="COMP303 Checks" local="true">
<file-match-pattern match-pattern="." include-pattern="true"/>
</fileset>
<filter name="FilesFromPackage" enabled="true">
<filter-data value="resources"/>
<filter-data value="test"/>
</filter>
</fileset-config>
9 changes: 9 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="resources"/>
<classpathentry kind="src" path="test"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="output" path="bin"/>
</classpath>
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bin/
23 changes: 23 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>COMP303Starter</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
</natures>
</projectDescription>
292 changes: 292 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .settings/org.eclipse.jdt.ui.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
eclipse.preferences.version=1
formatter_profile=_COMP303
formatter_settings_version=12
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
# COMP303Starter
Starter project configuration for my COMP 303 Software Development course at McGill University

For this project to be correctly imported in Eclipse, you need the following configuration:

* [Eclipse Mars.1](https://www.eclipse.org/downloads/index.php) extended with [checkstyle](http://marketplace.eclipse.org/content/checkstyle-plug) and [EclEmma](http://marketplace.eclipse.org/content/eclemma-java-code-coverage);
* A properly installed Java 7 execution environment;

To complete the setup, you need to point Eclipse to the JavaFX library. Do this:
1. Right click on the project in the Package Explorer and select `Properties | Java Build Path` then click on the `Libraries` tab.
2. Select `Add External JARs...` and find the file `jfxrt.jar`, which should be under the following subdirectory of your local Java installation directory: `...Java/jdk1.7.0.xxx/jre/lib`. Click `Apply`, then `OK`

Note that if you plan to publicly post your code somewhere (such as GitHub), it's a good idea to attach a license and copyright notice to it. See the `LICENSE` file for an example.

This project configuration will automatically use the recommended code formatting guidelines for the course automatically when you use Eclipe's various code generation features. It will also automatically check your code for violations to style rules.
9 changes: 9 additions & 0 deletions src/ca/mcgill/comp303/cards/Card.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package ca.mcgill.comp303.cards;

/**
* Class card.
*/
public class Card
{

}
291 changes: 291 additions & 0 deletions style/Formatter.xml

Large diffs are not rendered by default.

179 changes: 179 additions & 0 deletions style/Style.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<!--
This configuration file was written by the eclipse-cs plugin configuration editor
-->
<!--
Checkstyle-Configuration: COMP 303 Checks
Description: none
-->
<module name="Checker">
<property name="severity" value="warning"/>
<module name="TreeWalker">
<property name="tabWidth" value="4"/>
<module name="FileContentsHolder"/>
<module name="JavadocMethod">
<property name="scope" value="protected"/>
<property name="allowUndeclaredRTE" value="true"/>
<property name="suppressLoadErrors" value="true"/>
</module>
<module name="JavadocType"/>
<module name="JavadocVariable">
<property name="severity" value="ignore"/>
<property name="scope" value="protected"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="JavadocStyle"/>
<module name="ConstantName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName">
<property name="tokens" value="VARIABLE_DEF"/>
</module>
<module name="MemberName">
<property name="format" value="^a[A-Z][a-zA-Z0-9]*$"/>
</module>
<module name="MethodName"/>
<module name="PackageName">
<property name="format" value="^[a-z][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z0-9_]*)*$"/>
</module>
<module name="ParameterName">
<property name="format" value="^p[A-Z][a-zA-Z0-9]*$"/>
</module>
<module name="StaticVariableName"/>
<module name="TypeName"/>
<module name="AvoidStarImport"/>
<module name="IllegalImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="LineLength">
<property name="ignorePattern" value="^ *\* *[^ ]+$"/>
<property name="max" value="150"/>
</module>
<module name="MethodLength">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="ParameterNumber">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="EmptyForIteratorPad">
<property name="option" value="space"/>
</module>
<module name="MethodParamPad"/>
<module name="NoWhitespaceAfter">
<property name="tokens" value="BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS"/>
</module>
<module name="NoWhitespaceBefore">
<property name="allowLineBreaks" value="true"/>
<property name="tokens" value="DOT"/>
</module>
<module name="OperatorWrap">
<property name="option" value="eol"/>
<property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LE,LITERAL_INSTANCEOF,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS_ASSIGN,QUESTION,SL,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN"/>
</module>
<module name="ParenPad">
<property name="severity" value="ignore"/>
<property name="option" value="space"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="TypecastParenPad">
<property name="tokens" value="RPAREN,TYPECAST"/>
</module>
<module name="WhitespaceAfter">
<property name="tokens" value="COMMA,SEMI"/>
</module>
<module name="WhitespaceAround">
<property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,LITERAL_ASSERT,LITERAL_ASSERT"/>
</module>
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
<module name="AvoidNestedBlocks"/>
<module name="EmptyBlock">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="LeftCurly">
<property name="option" value="nl"/>
</module>
<module name="NeedBraces"/>
<module name="RightCurly">
<property name="option" value="alone"/>
</module>
<module name="AvoidInlineConditionals"/>
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="HiddenField"/>
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>
<module name="MagicNumber">
<property name="ignoreNumbers" value="-1, 0, 1, 2,3,4"/>
</module>
<module name="MissingSwitchDefault"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="FinalClass"/>
<module name="HideUtilityClassConstructor"/>
<module name="InterfaceIsType"/>
<module name="VisibilityModifier"/>
<module name="ArrayTypeStyle"/>
<module name="FinalParameters">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="GenericIllegalRegexp">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="TodoComment">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="UpperEll"/>
<module name="AnonInnerLength">
<property name="max" value="50"/>
</module>
<module name="EmptyForInitializerPad">
<property name="option" value="space"/>
</module>
<module name="CovariantEquals"/>
<module name="ModifiedControlVariable"/>
<module name="StringLiteralEquality"/>
<module name="NestedIfDepth">
<property name="max" value="4"/>
</module>
<module name="NestedTryDepth"/>
<module name="SuperClone"/>
<module name="SuperFinalize"/>
<module name="IllegalCatch"/>
<module name="ReturnCount">
<property name="max" value="5"/>
</module>
<module name="DeclarationOrder"/>
<module name="ParameterAssignment"/>
<module name="DefaultComesLast"/>
<module name="FallThrough"/>
<module name="MultipleVariableDeclarations"/>
<module name="UnnecessaryParentheses"/>
<module name="BooleanExpressionComplexity"/>
<module name="NPathComplexity"/>
<module name="PackageHtml">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
</module>
<module name="FileTabCharacter">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="NewlineAtEndOfFile">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="Translation"/>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CSOFF:"/>
<property name="onCommentFormat" value="CSON:"/>
</module>
</module>

0 comments on commit 46e5f91

Please sign in to comment.