Skip to content

Commit

Permalink
Add tidyall presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
autarch committed May 8, 2017
1 parent 39a7023 commit b381258
Show file tree
Hide file tree
Showing 9 changed files with 204 additions and 0 deletions.
1 change: 1 addition & 0 deletions tidy-all-the-things/Gruntfile.js
1 change: 1 addition & 0 deletions tidy-all-the-things/css
70 changes: 70 additions & 0 deletions tidy-all-the-things/index.html
@@ -0,0 +1,70 @@
<!doctype html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta charset="utf-8" />

<title>Tidy All the Things with Code::TidyAll</title>
<meta name="description" content="TidyAll is a tool for linting and tidying all the files in a project, regardless of language" />
<meta name="author" content="Dave Rolsky" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="stylesheet" href="css/reveal.css" />
<link rel="stylesheet" href="css/theme/white.css" id="theme" />

<script>
document.write( '<link rel="stylesheet" href="css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' );
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->

<style type="text/css">
/*<![CDATA[*/
iframe.c4 {margin:0;overflow:hidden;border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px}
code.c3 {word-wrap: break-word;}
code.c2 {font-size: 18px; margin-top: 20px;}
img.c1 {-webkit-transform: rotate(180deg);}
/*]]>*/
</style>
</head>

<body>
<div class="reveal">
<div class="slides">
<section data-markdown="index.md"
data-separator="^\n------\n"
data-separator-vertical="^\n\+\+\+\+\+\+\n"
data-separator-notes="^Note:"
data-charset="UTF-8">
</section>
</div>
</div>

<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize(
{
maxScale: 2.0,
controls: true,
progress: true,
history: true,
center: true,
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'linear', // default/cube/page/concave/zoom/linear/fade/none
// Optional libraries used to extend on reveal.js
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
]
});
</script>
</body>
</html>
127 changes: 127 additions & 0 deletions tidy-all-the-things/index.md
@@ -0,0 +1,127 @@
# Tidy All the Things

## Dave Rolsky

[https://metacpan.org/release/Code-TidyAll](https://metacpan.org<br>/release/Code-TidyAll)

------

## What is Code::TidyAll?

Note:
A linter and prettifier for files in any language, from JS to Perl to JSON.

------

## Plugin- and Config-Based

Note:
Entirely driven by config, which specifies which plugins to use and what files
each plugin applies to.

------

```
ignore = DateTime-*/**/*
...
[PerlCritic]
select = **/*.{pl,pm,t,psgi}
argv = --profile=$ROOT/perlcriticrc
[PerlTidy]
select = **/*.{pl,pm,t,psgi}
argv = --profile=$ROOT/perltidyrc
[SortLines::Naturally]
select = .stopwords
[Test::Vars]
select = **/*.pm
```

------

```
global_options = ...
global_options = ...
[SomePlugin]
plugin_options = ...
[SomePlugin another config]
plugin_options = ...
[DifferentPlugin]
...
```

------

```
$> tidyall -a -j 8
```

------

## Caching Results

Note:
TidyAll caches results by default, and only re-runs checks when the file
changes. You can force a run if you want.

------

## Testing Tidyness

```perl
use Test::Code::TidyAll;
use Test::More;

tidyall_ok();

done_testing();
```

------

## Caching Strategies

Note:
Caching strategies are also pluggable. In particular, you can set up caching
to be shared between branches for CI systems.

------

## Many CLI Options

Note:
File selection options. Caching options. Verbosity, etc.

------

## Git Hooks

```
#!/usr/bin/env perl
use strict;
use warnings;
use Code::TidyAll::Git::Precommit;
Code::TidyAll::Git::Precommit->check();
```

in `.git/hooks/pre-commit`

------

## Available Plugins

Note:

PerlTidy, Perl Critic, JSON, JS Hint & Lint, Pod files, Line sorting, gofmt
and go vet. Fairly easy to write more.

------

## Questions?
1 change: 1 addition & 0 deletions tidy-all-the-things/js
1 change: 1 addition & 0 deletions tidy-all-the-things/lib
1 change: 1 addition & 0 deletions tidy-all-the-things/node_modules
1 change: 1 addition & 0 deletions tidy-all-the-things/package.json
1 change: 1 addition & 0 deletions tidy-all-the-things/plugin

0 comments on commit b381258

Please sign in to comment.