Instructor: Prasun Dewan (FB 150,

Slides:



Advertisements
Similar presentations
Web Filtering. ExchangeDefender Web Filtering provides policy-controlled protection from dangerous content on the web. Web Filtering is agent based, allowing.
Advertisements

Corporate Property Automated Information System (CPAIS) Macro Walkthrough Guide for Excel Version 2003.
Installing SAS 9.3 Raymond R. Balise Health Research and Policy.
Installing SAS 9.3 Raymond R. Balise Health Research and Policy.
INF 123: Software Architectures, Distributed Systems, and Interoperability Discussion Session Week 3 - Spring 2008 Instructor: Prof. Richard N. Taylor.
Installing geant4 v9.5 using Windows Daniel Brandt, 06 April 2012 Installing Geant4 v9.5 for Windows A step-by-step guide for Windows XP/Vista/7 using.
Installing Ricoh Driver. Items you need to know IP address of Printer Options that are installed And Paper Sizes To get all this information you can print.
Ch 8-3 Working with domains and Active Directory.
taskbar Notification area Start To change size of taskbar: RMC- uncheck Lock the taskbar Changing Properties : RMC- Properties.
How to Download and Install a Sharp Print Driver on a Mac.
Eclipse Overview Introduction to Web Programming Kirkwood Continuing Education Fred McClurg © Copyright 2015, Fred McClurg, All Rights Reserved.
Introduction to Android. Android as a system, is a java based operating system that runs on the Linux kernel. The system is very lightweight and full.
Lecture Set 1 Part C: Understanding Visual Studio and.NET – Applications, Solutions, Projects (no longer used – embedded in Lecture Set 2A)
© 2005 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures for Java William H. Ford William R. Topp Appendix E The EZJava.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files.
Diagnostic Pathfinder for Instructors. Diagnostic Pathfinder Local File vs. Database Normal operations Expert operations Admin operations.
Go to your school’s web locker site Your user name is the first letter of your first name, the first four letters of.
Liferay Installation Prepared by: Do Xuan Hai 8 August 2011.
An Introduction to Designing, Executing and Sharing Workflows with Taverna Katy Wolstencroft myGrid University of Manchester IMPACT/Taverna Hackathon 2011.
Renesas Technology America Inc. 1 M16C Seminars Lab 3 Creating Projects Using HEW4 14 March 2005 M16C Seminars Lab 3 Creating Projects Using HEW4 Last.
Surya Bahadur Kathayat Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example.
Introduction to Eclipse Programming with an Integrated Development Environment.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
Time to apply stuff… Faculty of Mathematics and Physics Charles University in Prague 5 th October 2015 Workshop 1 – Java Wrestling.
Google App Engine using Java 1. Outline Getting started Guestbook example Todo example Simplified Madlib 2.
Editing and Debugging Mumps with VistA and the Eclipse IDE Joel L. Ivey, Ph.D. Dept. of Veteran Affairs OI&T, Veterans Health IT Infrastructure & Security.
Google App Engine using Java 1. Outline Getting started Guestbook example Todo example Simplified Madlib 2.
Downloading and Installing GRASP-AF Workshop Ian Robson Information Analyst, North of England Cardiovascular Network.
What type of project? I tried three type of project and the only one I managed to obtain the results I wanted was this one. It is more flexible and much.
CONTENT MANAGEMENT SYSTEM CSIR-NISCAIR, New Delhi
Appendix A Barb Ericson Georgia Institute of Technology May 2006
Development Environment
Weebly Elements, Continued
Weebly Elements, Continued
Student SOLE Page – Living Page
Appendix A Barb Ericson Georgia Institute of Technology May 2006
Configuring Applications
IBM Rational Rhapsody Advanced Systems Training v7.5
Eclipse Navigation & Usage.
Data Validation and Protecting Workbook
Parts.cat.com Client training 2016.
Instructor: Prasun Dewan (FB 150,
Android 基礎.
Executing Runtime Checks (For Comp401 and Comp410)
Adding Assignments and Learning Units to Your TSS Course
GTS WebSocket General Guide
Microsoft Word Reviewing Documents.
Macrosystems EDDIE: Getting Started + Troubleshooting Tips
Exploring Microsoft® Access® 2016 Series Editor Mary Anne Poatsy
Microsoft® Office Word 2007 Training
Setting up Eclipse Locally
Executing Runtime Checks (For Comp401 and Comp410)
How to Run a Java Program
[insert Module title here]
JavaTeaching and Importing a github repository
[insert Module title here]
Word offers a number of features to help you streamline the formatting of documents. In this chapter, you will learn how to use predesigned building blocks.
[insert Module title here]
Macrosystems EDDIE: Getting Started + Troubleshooting Tips
Introduction to RefWorks
Macrosystems EDDIE: Getting Started + Troubleshooting Tips
Review of Previous Lesson
Java Code Review with CheckStyle
Macrosystems EDDIE: Getting Started + Troubleshooting Tips
Workshop for Programming And Systems Management Teachers
Selenium IDE Installation and Use.
Presentation transcript:

Instructor: Prasun Dewan (FB 150, dewan@unc.edu) Appendix: Installing and Using CheckStyle with UNC-Checks (Process depends on OS and Eclipse Version) Instructor: Prasun Dewan (FB 150, dewan@unc.edu)

What is CheckStyle? A tool that checks your source code to ensure that your code meets requirements specified by a configuration file. There are many configuration files that use predefined Checkstyle checks. Sun Checks Google checks All check are assignment independent. Very few assignment-dependent checks have to do with code structure –they address naming, formatting, comment stricture, and other issues. Coding checks are sometimes too rigid Magic numbers

What is UNC CheckStyle Defines new code-structure checks More flexible magic number checks New kinds of assignment-independent checks – e.g. side effects, code repetition, design patterns Assignment-dependent checks Different configuration files to exercise different assignment-specific checks.

Checkstyle Installation and Use Instructions 1. Download and Install Checkstyle 2. Download and Install UNC Checks 3. Download Install Configuration Files 4. Invoke Checkstyle If Checkstyle does not install, reverse 1 and 2 after uninstalling Checkstyle

Download Checkstyle Zip and Jar

Checkstyle Installation and Use Instructions 1. Download and Install Checkstyle  2. Download and Install UNC Checks 3. Download Install Configuration Files 4. Invoke Checkstyle If Checkstyle does not install, reverse 1 and 2 after uninstalling Checkstyle

HelpInstall New Software

Add

Add Options, Select Archive

Name Archive and Give Location of Checkstyle ZIP

Select Checkstye and Proceed

Navigate to Plugins or Dropins Subdirectory of Eclipse Install (Windows) If you see a dropins folder in eclipse (depends on the version of eclipse) use it instead of plugins If you see a dropins folder in eclipse (depends on the version of eclipse) go to it, otherwise navigate to plugins On Macs an alternative process should be used (see slides by Hank Hester presented later)

Navigation to Dropins of Eclipse Install (Windows)

Close Eclipse but Do Not Restart Eclipse will ask you if you want to restart We want to close Eclipse but not restart So Say No and close Eclipse

Checkstyle Installation and Use Instructions 1. Download and Install Checkstyle 2. Download and Install UNC Checks  3. Download Install Configuration Files 4. Invoke Checkstyle If Checkstyle does not install, reverse 1 and 2 after uninstalling Checkstyle

Find The Install directory of Eclipse Windows Screenshot, Mac Screenshot later

Navigate to Eclipse Install Directory If dropins and plugins subfolders both exist, go to dropins, otherwise go to plugins

Navigation to Dropins of Eclipse Install and Add Jar Add UNCChecks_6.5.0.jar to dropins (or plugins, if dropins does not exist) and restart eclipse

Find Eclipse.app (Mac) Slide by Hank Hester

Right click and select “show package contents” (Mac) Slide by Hank Hester

Go to Contents/Eclipse/dropins and Add File (Mac) Slide by Hank Hester Add UNCChecks_6.5.0.jar to dropins (or plugins if dropins does not exist) and restart eclipse

If Eclipse hangs when building project, delete the added file! Restart Eclipse If Eclipse hangs when building project, delete the added file!

Examining Project Properties of Some Project You want Checked

Finding UNC Checks If you do not see the Checkstyle item in the left pane, then Checkstyle did not install properly If you do not see the UNC Checks option then UNCChecks did not install properly Do not give up if something goes wrong, please use Piazza and instructor help

Checkstyle Installation and Use Instructions 1. Download and Install Checkstyle 2. Download and Install UNC Checks 3. Download Install Configuration Files  4. Invoke Checkstyle If Checkstyle does not install, reverse 1 and 2 after uninstalling Checkstyle

Assignment Specific Checks? Every assignment has its own checks Need to tell Checkstyle to use the correct checks for an assignment

Access Checks File on Course Page On the course page, next to the link to an assignment is the checks file

Download Assignment-Specific File Now we need to tell Checkstyle to use it

Select Preferences Eclipse Sub-Menu (Windows and Mac) On Windows it is a submenu of the Window top-level pull-down menu On a Mac it is a submenu of the Eclipse top-level pull-down menu

Select Checkstyle Left Pane Item You should see the same options you saw in project properties, but here we can add to the options Click new

Executing New Command Specify that you will load the configuration from an external file Next browse to the downloaded file

Browse to Downloaded File

Give the checks a name

New Configuration Added The file has been converted into a form that Checkstyle can process Now we want to associate our assignment project with this configuration

Examining Project Properties Select project properties

Assign New Configuration

For each new Assignment Download the checks file Create a new global configuration using the preferences command. If the file changes (I post an update) the configuration does not have to be recreated, though you will need to replace the file and restart Eclipse. Associate the assignment project with the configuration using project properties. The checks file assumes modules in unc checks, so if you have not added the jar to the dropins (or plugins) folder, you will get an error. See next ppt.

Error with Missing Modules If you were getting the following error, see next slides: Slide by Kent Torell

Check if Unc Checks are installed First check in Window --> Preferences (or if on Mac Eclipse --> Preferences). Under the CheckStyles tab you should see UNC Checks as seen below: Slide by Kent Torell

Error Fix If you don't see UNC CheckStyle you did not put the UNCChecks_6.5.0 in the dropins folder of your eclipse. Make sure that you put UNCChecks in the correct spot, restart eclipse and try again. Slide by Kent Torell

Checkstyle Installation and Use Instructions 1. Download and Install Checkstyle 2. Download and Install UNC Checks 3. Download Install Configuration Files 4. Invoke Checkstyle  If Checkstyle does not install, reverse 1 and 2 after uninstalling Checkstyle

Checking Code With Checkstyle On each save, checkstyle can checks can be automatically done if checkstyle has been activated. However, UNC checks need to access multiple files, so do not activate checkstyle to avoid annoying messages Instead, invoke Checks Code With Checkstyle when you want the whole project (rather than a single file) checked.

Consent form Explicitly checked unc checks are part of a research project and will work only if you agree to allow usage data to be gathered for research If you do not see the yes/no dialog, minimize other windows that may be covering it

Consent Form and Log Per Project Per assignment log Consent form Will probably not look at data this semester Need to give consent per project – files stored per project

Check Style Violations in Warnings Window of Eclipse

Check Style Violations in Eclipse Editor Window

Bad Warnings vs. Good Info This is bad, you did not define something we expect (shown in warnings section of “problems”) This is good, you defined something we expect (Shown in info section)

Warning vs Info Sections Bad warning if you are implementing these extra credit features This is good info, tells you one of the expected types has been found This is pure info, tells you what classes are being expected //EC suffix means extra credit You should see such a message for each expected type

Removing UNC Checks Select UNC Filter as an exclude from checking item in project properties, checkstyle

Removing Checkstyle Completely

Removing Checkstyle Completely

 Eclipse Checks Checkstyle and UNC Checks Built-in Eclipse Checks Checkstyle augments Eclipse built in checks

Enabling Built in Eclipse Checks

Two Important Built-in Checks These are done by the compiler, not Checkstyle or UNCChecks

Checkstyle and Compiler Checks are Integrated These are displayed using the same framework in Eclipse