Skip to content

Commit

Permalink
Merge pull request #92 from ytake/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ytake committed Nov 29, 2014
2 parents a2546c0 + 5e7a289 commit 25d8633
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 5 deletions.
8 changes: 4 additions & 4 deletions app/filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
*/

\Route::filter('csrf', function() {

if (\Session::token() != \Input::get('_token')) {
throw new \Illuminate\Session\TokenMismatchException;
if (\Session::token() !== \Input::get('_token')) {
throw new \Illuminate\Session\TokenMismatchException;
}
}
});
);
2 changes: 1 addition & 1 deletion app/views/elements/header.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<ul class="nav navbar-nav navbar-right">
<li><a href="http://laravel.com" target="_blank">Laravel</a></li>
<li><a href="http://laravel.jp" target="_blank">Laravel(JP)</a></li>
<li><a href="http://laravel4.kore1server.com/docs" target="_blank">ドキュメント</a></li>
<li><a href="http://readouble.com/" target="_blank">ドキュメント</a></li>
<li><a href="/faq">FAQ&nbsp;<i class="glyphicon glyphicon-question-sign"></i></a></li>
<li><a href="/feed/atom" alt="Laravel recipes(JP) Atom feed" title="Laravel recipes(JP) Atom feed" target="_blank">Atom&nbsp;<img src="/images/rss-16-black.png"></a></li>
<li><a href="/feed/rss" alt="Laravel recipes(JP) RSS feed" title="Laravel recipes(JP) RSS feed" target="_blank">RSS&nbsp;<img src="/images/rss-16-black.png"></a></li>
Expand Down
55 changes: 55 additions & 0 deletions docs/recipes/solution/ scrutinizer-ci.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
Title: scrutinizerCIを使って継続的インテグレーションと静的解析
Topics: solution, scrutinizerCI
Position: 2
---

{problem}
Laravelプロジェクトを静的解析と継続的インテグレーション、コードカバレッジも取得したい
{/problem}

{solution}
ソースコードの静的解析に定評のあるscrutinizerCIを利用してみましょう
[scrutinizer CI](https://scrutinizer-ci.com/)
GitHub、またはBitbucketを利用していれば、どなたでも利用できます
いずれかのアカウントをお持ちであれば、
そのアカウントを使ってscrutinizerCIをログインをして、
利用したいリポジトリを選択するだけです
次にそれぞれの機能を利用するには、
リポジトリに`.scrutinizer.yml`を設置する必要がありますが、
webブラウザ上から設定する事も出来ます

静的解析自体はすぐに利用できますので、まずは自身のプロジェクトで利用してみましょう!

リポジトリ登録後に、解析が始まります

このサイトを解析すると次の様な結果となりました

![Result1](/images/scrutinizerCI1.png)
![Result2](/images/scrutinizerCI2.png)
コードの解析結果一覧や、
問題のあるコードや、バグ発生の可能性があるコードを解析して通知してくれます

必要に応じて利用したい機能をymlファイルで指定します
```text
tools:
external_code_coverage: true
checks:
php:
code_rating: true
duplication: true
```

様々な機能が用意されており、publicなリポジトリは無料で利用する事が出来ますので、
自身のサービス改善、または品質向上に役立ててみてはいかがでしょうか?
{/solution}

{discussion}

githubなどで利用できるバッジもあります
パッケージなどの品質表示として利用してみましょう!
{/discussion}

{credit}
Author:Yuuki Takezawa
{/credit}
Binary file added public/images/scrutinizerCI1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/scrutinizerCI2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 25d8633

Please sign in to comment.