Skip to content

Commit

Permalink
app.js: Add redirect for pyflakes project
Browse files Browse the repository at this point in the history
  • Loading branch information
srivama committed Aug 13, 2018
1 parent 373e79d commit 7c330ee
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
10 changes: 5 additions & 5 deletions _projects/integrate-pyflakes-AST.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ mentors:
- jayvdb
- myint
- adhikasp
name: "Integrate pyflakes-enhanced AST into coala "
name: "Integrate pyflakes-enhanced AST into coala"
requirements:
- "The participant has a patch to any bear merged. Check out
- "The participant has a patch to any bear merged. Check out
[existing bear proposal](https://github.com/coala/coala-bears/issues)."
- "The participant has a patch to pyflakes merged. Check out
- "The participant has a patch to pyflakes merged. Check out
[easy task](https://bugs.launchpad.net/pyflakes/+bugs?field.tag=easy)."
status: in_progress
tags:
- Bears
- Pyflakes
---
flake8 has many plugins which are commonly used in the python development
community. flake8 is a wrapper, similar to coala, that provides the
community. flake8 is a wrapper, similar to coala, that provides the
AST to its plugins. Instead of coala using the flake8
wrapper, which adds another level of complexity and uncertainty with regards
to configuration, coala would like to directly load the python-enhanced AST
Expand All @@ -39,7 +39,7 @@ This project focuses on integrating the
[AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree) into coala and
redesign flake8 plugins
[`flake8-future-import`](https://github.com/xZise/flake8-future-import) and
[`flake8-builtins`](https://github.com/gforcada/flake8-builtins) so that they
[`flake8-builtins`](https://github.com/gforcada/flake8-builtins) so that they
use pyflakes-enhanced AST.
A seperate wrapper is also needed to be designed so that the pre-existing
plugins can work without any modification.
Expand Down
12 changes: 12 additions & 0 deletions resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
'code' : 'ro'
}];
selected_language = JSON.parse(window.localStorage.getItem('lang')) || langs[0];

var redirectTo = [];
redirectTo.push({
key: "integrate_pyflakes-enhanced_ast_into_coala_",
value: "integrate_pyflakes-enhanced_ast_into_coala"
})

return {
setData: function (val) {
angular.forEach(langs, function(v, k){
Expand Down Expand Up @@ -262,6 +269,11 @@

var project_requested = encodeURIComponent($location.search().project);
if(project_requested){

if(project_requested in redirectTo){
project_requested = redirectTo[project_requested]
}

if(Object.keys($scope.projects_url_dict).indexOf(project_requested) > -1){
self.showProject($scope.projectList[$scope.projects_url_dict[project_requested]])
}
Expand Down

0 comments on commit 7c330ee

Please sign in to comment.